#include "model.h"

void init_model(Model *model) {
  model->vertex_data.vertices.resize(6);

  model->vertex_data.vertices[0].position = Vector3(-0.5f, -0.5f, 0.5f);
  model->vertex_data.vertices[1].position = Vector3(0.5f, 0.5f, 0.5f);
  model->vertex_data.vertices[2].position = Vector3(-0.5f, 0.5f, 0.5f);
  model->vertex_data.vertices[3].position = Vector3(-0.5f, -0.5f, 0.5f);
  model->vertex_data.vertices[4].position = Vector3(0.5f, -0.5f, 0.5f);
  model->vertex_data.vertices[5].position = Vector3(0.5f, 0.5f, 0.5f);

  model->vertex_data.vertices[0].color = Vector3(0.0f, 0.0f, 1.0f);
  model->vertex_data.vertices[1].color = Vector3(0.0f, 1.0f, 1.0f);
  model->vertex_data.vertices[2].color = Vector3(1.0f, 1.0f, 0.0f);
  model->vertex_data.vertices[3].color = Vector3(1.0f, 0.0f, 1.0f);
  model->vertex_data.vertices[4].color = Vector3(0.0f, 1.0f, 0.0f);
  model->vertex_data.vertices[5].color = Vector3(1.0f, 1.0f, 1.0f);

  model->vertex_data.vertices[0].uv = Vector2(0.0, 0.0);
  model->vertex_data.vertices[1].uv = Vector2(1.0, 1.0);
  model->vertex_data.vertices[2].uv = Vector2(0.0, 1.0);
  model->vertex_data.vertices[3].uv = Vector2(0.0, 0.0);
  model->vertex_data.vertices[4].uv = Vector2(1.0, 0.0);
  model->vertex_data.vertices[5].uv = Vector2(1.0, 1.0);
}
