]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/Body.hpp
basic creature model
[blobs.git] / src / world / Body.hpp
index 5f82be232b4dc3e78029fd27338b122ab4a41421..fba121b90995d113c2fad374c39db8bd7ae28942 100644 (file)
@@ -16,6 +16,7 @@ namespace graphics {
 }
 namespace world {
 
+class Creature;
 class Simulation;
 
 class Body {
@@ -83,6 +84,11 @@ public:
 
        void Cache() noexcept;
 
+       // body takes over ownership of given pointer
+       void AddCreature(Creature *);
+       std::vector<Creature *> &Creatures() noexcept { return creatures; }
+       const std::vector<Creature *> &Creatures() const noexcept { return creatures; }
+
 private:
        void AddChild(Body &);
        void RemoveChild(Body &);
@@ -104,6 +110,8 @@ private:
        glm::dmat4 local;
        glm::dmat4 inverse_local;
 
+       std::vector<Creature *> creatures;
+
 };
 
 }