]> git.localhorst.tv Git - blank.git/blobdiff - src/world/Entity.hpp
fix return type for Entity::Transform()
[blank.git] / src / world / Entity.hpp
index 0117fa9cb0d0801deb53750c54b0b93c2d236cc1..e38e0b449e79bf41eae31c4800a7bc10ad04d6ea 100644 (file)
@@ -4,6 +4,7 @@
 #include "Chunk.hpp"
 #include "EntityDerivative.hpp"
 #include "EntityState.hpp"
+#include "Steering.hpp"
 #include "../geometry/primitive.hpp"
 #include "../model/Instance.hpp"
 
@@ -32,6 +33,9 @@ public:
        Entity(const Entity &) noexcept;
        Entity &operator =(const Entity &) = delete;
 
+       Steering &GetSteering() noexcept { return steering; }
+       const Steering &GetSteering() const noexcept { return steering; }
+
        bool HasController() const noexcept { return ctrl; }
        // entity takes over ownership of controller
        void SetController(EntityController *c) noexcept;
@@ -91,7 +95,7 @@ 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 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
@@ -142,6 +146,7 @@ private:
 
 
 private:
+       Steering steering;
        EntityController *ctrl;
        Instance model;