]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Entity.hpp
linker argument order for old gcc
[blank.git] / src / world / Entity.hpp
index 36f686848e6542353e3c47d20e94fdb9af58902e..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>
 
 
@@ -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