]> git.localhorst.tv Git - blank.git/blob - src/entity.hpp
split entity from controller
[blank.git] / src / entity.hpp
1 #ifndef BLANK_ENTITY_HPP_
2 #define BLANK_ENTITY_HPP_
3
4 #include "geometry.hpp"
5
6 #include <glm/glm.hpp>
7
8
9 namespace blank {
10
11 class Entity {
12
13 public:
14         Entity();
15
16         const glm::vec3 &Velocity() const { return velocity; }
17         void Velocity(const glm::vec3 &);
18
19         const glm::vec3 &Position() const { return position; }
20         void Position(const glm::vec3 &);
21         void Move(const glm::vec3 &delta);
22
23         const glm::mat4 &Rotation() const { return rotation; }
24         void Rotation(const glm::mat4 &);
25
26         const glm::mat4 &Transform() const;
27         Ray Aim() const;
28
29         void Update(int dt);
30
31 private:
32         glm::vec3 velocity;
33         glm::vec3 position;
34
35         glm::mat4 rotation;
36
37         mutable glm::mat4 transform;
38         mutable bool dirty;
39
40 };
41
42 }
43
44 #endif