2021-01-13 10:42:57 -06:00
|
|
|
#include "Ball.h"
|
|
|
|
|
|
|
|
Ball::Ball() {
|
2021-01-13 16:47:16 -06:00
|
|
|
// It's a cube really
|
|
|
|
// Front
|
2021-01-17 14:36:38 -06:00
|
|
|
vertices.push_back(Vertex(1.0f, 1.0f, 1.0f, 0.0f, 1.0f));
|
|
|
|
vertices.push_back(Vertex(1.0f, -1.0f, 1.0f, 0.0f, 0.0f));
|
|
|
|
vertices.push_back(Vertex(-1.0f, 1.0f, 1.0f, 1.0f, 1.0f));
|
|
|
|
vertices.push_back(Vertex(-1.0f, -1.0f, 1.0f, 1.0f, 0.0f));
|
2021-01-13 16:47:16 -06:00
|
|
|
// Back
|
2021-01-17 14:36:38 -06:00
|
|
|
vertices.push_back(Vertex(1.0f, 1.0f, -1.0f, 0.0f, 0.0f));
|
|
|
|
vertices.push_back(Vertex(1.0f, -1.0f, -1.0f, 0.0f, 1.0f));
|
|
|
|
vertices.push_back(Vertex(-1.0f, 1.0f, -1.0f, 1.0f, 0.0f));
|
|
|
|
vertices.push_back(Vertex(-1.0f, -1.0f, -1.0f, 1.0f, 1.0f));
|
2021-01-13 10:42:57 -06:00
|
|
|
|
2021-01-13 16:47:16 -06:00
|
|
|
//Front
|
2021-01-13 10:42:57 -06:00
|
|
|
indices.push_back(Index(0, 1, 2));
|
2021-01-13 13:17:31 -06:00
|
|
|
indices.push_back(Index(1, 2, 3));
|
2021-01-13 16:47:16 -06:00
|
|
|
//Back
|
|
|
|
indices.push_back(Index(4, 5, 6));
|
|
|
|
indices.push_back(Index(5, 6, 7));
|
|
|
|
// Top
|
|
|
|
indices.push_back(Index(0, 4, 6));
|
|
|
|
indices.push_back(Index(0, 2, 6));
|
|
|
|
// Bottom
|
|
|
|
indices.push_back(Index(1, 3, 7));
|
|
|
|
indices.push_back(Index(1, 5, 7));
|
|
|
|
// Left side
|
|
|
|
indices.push_back(Index(0, 1, 5));
|
|
|
|
indices.push_back(Index(0, 4, 5));
|
|
|
|
// Right side
|
|
|
|
indices.push_back(Index(2, 3, 7));
|
|
|
|
indices.push_back(Index(2, 6, 7));
|
2021-01-13 10:42:57 -06:00
|
|
|
}
|
|
|
|
|