X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FEntity.hpp;h=d5c3cb1822f94a80b53d8d20690f45bbc90b860c;hb=dcd54cacda98c2c0f7cf0c7a9131fb858d8ee10a;hp=e38e0b449e79bf41eae31c4800a7bc10ad04d6ea;hpb=110ef77a019384fccbbf33649955bcc064a6399e;p=blank.git diff --git a/src/world/Entity.hpp b/src/world/Entity.hpp index e38e0b4..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 @@ -96,6 +96,8 @@ public: /// get a transform for this entity's coordinate space 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