]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Entity.hpp
glm backwards compatibility
[blank.git] / src / world / Entity.hpp
index e38e0b449e79bf41eae31c4800a7bc10ad04d6ea..d5c3cb1822f94a80b53d8d20690f45bbc90b860c 100644 (file)
@@ -6,11 +6,11 @@
 #include "EntityState.hpp"
 #include "Steering.hpp"
 #include "../geometry/primitive.hpp"
+#include "../graphics/glm.hpp"
 #include "../model/Instance.hpp"
 
 #include <cstdint>
 #include <string>
-#include <glm/glm.hpp>
 #include <glm/gtc/quaternion.hpp>
 
 
@@ -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