X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FEntity.hpp;h=d5c3cb1822f94a80b53d8d20690f45bbc90b860c;hb=78e56cf8a2029981502dd632a8fbc08da558fe01;hp=36f686848e6542353e3c47d20e94fdb9af58902e;hpb=6a3227ca747d0598711f7354cd39897184e9fe6a;p=blank.git diff --git a/src/world/Entity.hpp b/src/world/Entity.hpp index 36f6868..d5c3cb1 100644 --- a/src/world/Entity.hpp +++ b/src/world/Entity.hpp @@ -6,11 +6,11 @@ #include "EntityState.hpp" #include "Steering.hpp" #include "../geometry/primitive.hpp" +#include "../graphics/glm.hpp" #include "../model/Instance.hpp" #include #include -#include #include @@ -95,7 +95,9 @@ public: void SetHead(float pitch, float yaw) noexcept; /// get a transform for this entity's coordinate space - const glm::mat4 Transform() const noexcept { return model_transform; } + const glm::mat4 &Transform() const noexcept { return model_transform; } + /// get the entity's local up vector + const glm::vec4 &Up() const noexcept { return model_transform[1]; } /// get a transform for this entity's coordinate space relative to reference chunk glm::mat4 Transform(const glm::ivec3 &reference) const noexcept; /// get a transform for this entity's view space relative to reference chunk