X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fentity.hpp;fp=src%2Fentity.hpp;h=59a3388757e0fc25132259faaddcb5931de17dd7;hb=cb959294a8271969ddfe411471d7f04e82c4788a;hp=0000000000000000000000000000000000000000;hpb=09b5fd4523246deace5f52eed03623d150b76913;p=blank.git diff --git a/src/entity.hpp b/src/entity.hpp new file mode 100644 index 0000000..59a3388 --- /dev/null +++ b/src/entity.hpp @@ -0,0 +1,44 @@ +#ifndef BLANK_ENTITY_HPP_ +#define BLANK_ENTITY_HPP_ + +#include "geometry.hpp" + +#include + + +namespace blank { + +class Entity { + +public: + Entity(); + + const glm::vec3 &Velocity() const { return velocity; } + void Velocity(const glm::vec3 &); + + const glm::vec3 &Position() const { return position; } + void Position(const glm::vec3 &); + void Move(const glm::vec3 &delta); + + const glm::mat4 &Rotation() const { return rotation; } + void Rotation(const glm::mat4 &); + + const glm::mat4 &Transform() const; + Ray Aim() const; + + void Update(int dt); + +private: + glm::vec3 velocity; + glm::vec3 position; + + glm::mat4 rotation; + + mutable glm::mat4 transform; + mutable bool dirty; + +}; + +} + +#endif