X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FEntity.hpp;h=05d795f38af6e67e0b0ac2b2633628efc58f2496;hb=a1f911f8257f614f874c201fede5d5206f5b7e80;hp=7c96f4f3408d2c346c3c638f10ff83bb19f53213;hpb=c04ea5a6f67d446ea29aa2e88dc4c666956d7732;p=blank.git diff --git a/src/world/Entity.hpp b/src/world/Entity.hpp index 7c96f4f..05d795f 100644 --- a/src/world/Entity.hpp +++ b/src/world/Entity.hpp @@ -4,7 +4,7 @@ #include "Block.hpp" #include "Chunk.hpp" #include "../model/geometry.hpp" -#include "../model/Model.hpp" +#include "../model/EntityModel.hpp" #include #include @@ -43,6 +43,10 @@ public: const Chunk::Pos ChunkCoords() const noexcept { return chunk; } + glm::vec3 AbsolutePosition() const noexcept { + return glm::vec3(chunk * Chunk::Extent()) + position; + } + const glm::quat &AngularVelocity() const noexcept { return angular_velocity; } void AngularVelocity(const glm::quat &) noexcept; @@ -59,7 +63,7 @@ public: private: const Shape *shape; - Model model; + EntityModel model; std::string name;