56 lines
781 B
C++
56 lines
781 B
C++
#ifndef ENTITY_H_
|
|
#define ENTITY_H_
|
|
|
|
#include "../lib/glm/glm.hpp"
|
|
|
|
class Entity {
|
|
public:
|
|
Entity();
|
|
virtual ~Entity() = default;
|
|
|
|
[[nodiscard]] const glm::vec3& position() const
|
|
{
|
|
return position_;
|
|
}
|
|
void set_position(const glm::vec3& pos)
|
|
{
|
|
position_ = pos;
|
|
}
|
|
|
|
[[nodiscard]] const glm::vec3& rotation() const
|
|
{
|
|
return rotation_;
|
|
}
|
|
void set_rotation(const glm::vec3& rot)
|
|
{
|
|
rotation_ = rot;
|
|
}
|
|
|
|
[[nodiscard]] const glm::vec3& scale() const
|
|
{
|
|
return scale_;
|
|
}
|
|
void set_scale(const glm::vec3& scale)
|
|
{
|
|
scale_ = scale;
|
|
}
|
|
|
|
void move(const glm::vec3& vec);
|
|
|
|
virtual void update(const float delta_time)
|
|
{
|
|
// ...
|
|
}
|
|
virtual void draw()
|
|
{
|
|
// ...
|
|
}
|
|
|
|
protected:
|
|
glm::vec3 position_;
|
|
glm::vec3 rotation_;
|
|
glm::vec3 scale_;
|
|
};
|
|
|
|
#endif // ENTITY_H_
|