X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FEntity.hpp;h=7c96f4f3408d2c346c3c638f10ff83bb19f53213;hb=955fbb45dedb570520fc45d2ce69f420bed2ad08;hp=83c1f6fb0889b88697365e34a129b15aa7dc076f;hpb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;p=blank.git diff --git a/src/world/Entity.hpp b/src/world/Entity.hpp index 83c1f6f..7c96f4f 100644 --- a/src/world/Entity.hpp +++ b/src/world/Entity.hpp @@ -3,15 +3,16 @@ #include "Block.hpp" #include "Chunk.hpp" +#include "../model/geometry.hpp" #include "../model/Model.hpp" +#include #include #include namespace blank { -class Ray; class Shape; class Entity { @@ -24,6 +25,15 @@ public: void SetShape(const Shape *, const glm::vec3 &color); void SetShapeless() noexcept; + const std::string &Name() const noexcept { return name; } + void Name(const std::string &n) { name = n; } + + const AABB &Bounds() const noexcept { return bounds; } + void Bounds(const AABB &b) noexcept { bounds = b; } + + bool WorldCollidable() const noexcept { return world_collision; } + void WorldCollidable(bool b) noexcept { world_collision = b; } + const glm::vec3 &Velocity() const noexcept { return velocity; } void Velocity(const glm::vec3 &) noexcept; @@ -51,6 +61,10 @@ private: const Shape *shape; Model model; + std::string name; + + AABB bounds; + glm::vec3 velocity; Block::Pos position; Chunk::Pos chunk; @@ -58,6 +72,8 @@ private: glm::quat angular_velocity; glm::mat4 rotation; + bool world_collision; + }; }