X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FBody.hpp;h=fba121b90995d113c2fad374c39db8bd7ae28942;hb=196f02bdbbd372b77141201f045fcfea318093b1;hp=5f82be232b4dc3e78029fd27338b122ab4a41421;hpb=98770f59a02c76f02de0a46ed36d9cfd52f5071b;p=blobs.git diff --git a/src/world/Body.hpp b/src/world/Body.hpp index 5f82be2..fba121b 100644 --- a/src/world/Body.hpp +++ b/src/world/Body.hpp @@ -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 &Creatures() noexcept { return creatures; } + const std::vector &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 creatures; + }; }