GameObjects

Began to add GameObjects, starting with the player.
This commit is contained in:
onTheZero
2025-08-13 00:59:03 -04:00
parent 237272c17b
commit 4bf6b02255
37 changed files with 2640 additions and 222 deletions

10
cube.h
View File

@@ -10,7 +10,7 @@
class Cube
{
private:
glm::vec3 position;
glm::vec3 Position;
glm::vec3 scale;
glm::vec3 rotation;
glm::vec3 color;
@@ -30,7 +30,7 @@ public:
Cube(glm::vec3 position, glm::vec3 scale, glm::vec3 rotation, glm::vec3 color)
{
this->position = position;
this->Position = position;
this->scale = scale;
this->rotation = rotation;
this->color = color;
@@ -48,7 +48,7 @@ public:
glm::mat4 getModelMatrix() const
{
glm::mat4 model = glm::mat4(1.0f);
model = glm::translate(model, position);
model = glm::translate(model, Position);
model = glm::rotate(model, glm::radians(rotation.x), glm::vec3(1, 0, 0));
model = glm::rotate(model, glm::radians(rotation.y), glm::vec3(0, 1, 0));
model = glm::rotate(model, glm::radians(rotation.z), glm::vec3(0, 0, 1));
@@ -59,7 +59,7 @@ public:
void setPosition(glm::vec3 position)
{
this->position = position;
this->Position = position;
}
void setScale(glm::vec3 scale)
@@ -79,7 +79,7 @@ public:
glm::vec3 getPosition() const
{
return position;
return Position;
}
glm::vec3 getScale() const