feat: assignment 2

This commit is contained in:
2025-10-13 15:04:53 +02:00
parent 986e31dbef
commit f981cee4e0
17 changed files with 649 additions and 56 deletions

55
src/entity.h Normal file
View File

@@ -0,0 +1,55 @@
#ifndef ENTITY_H_
#define ENTITY_H_
#include "../lib/glm/glm.hpp"
class Entity {
public:
Entity();
virtual ~Entity()
{
}
const glm::vec3& getPosition() const
{
return position_;
}
void setPosition(const glm::vec3& pos)
{
position_ = pos;
}
const glm::vec3& getRotation() const
{
return rotation_;
}
void setRotation(const glm::vec3& rot)
{
rotation_ = rot;
}
const glm::vec3& getScale() const
{
return scale_;
}
void setScale(const glm::vec3& scale)
{
scale_ = scale;
}
void move(const glm::vec3& vec);
virtual void update(float deltaTime)
{
}
virtual void draw()
{
}
protected:
glm::vec3 position_;
glm::vec3 rotation_;
glm::vec3 scale_;
};
#endif // ENTITY_H_