]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/Body.hpp
fix double deletes on app exit
[blobs.git] / src / world / Body.hpp
index 5f82be232b4dc3e78029fd27338b122ab4a41421..5ac4fa1ddcfab52bf305b07825a03becff283612 100644 (file)
@@ -2,7 +2,7 @@
 #define BLOBS_WORLD_BODY_HPP_
 
 #include "Orbit.hpp"
-#include "../graphics/glm.hpp"
+#include "../math/glm.hpp"
 
 #include <vector>
 
@@ -11,6 +11,9 @@ namespace blobs {
 namespace app {
        class Assets;
 }
+namespace creature {
+       class Creature;
+}
 namespace graphics {
        class Viewport;
 }
@@ -81,7 +84,18 @@ public:
 
        virtual void Draw(app::Assets &, graphics::Viewport &) { }
 
+       void Tick(double dt);
        void Cache() noexcept;
+       void CheckCollision() noexcept;
+
+       void AddCreature(creature::Creature *);
+       void RemoveCreature(creature::Creature *);
+       std::vector<creature::Creature *> &Creatures() noexcept { return creatures; }
+       const std::vector<creature::Creature *> &Creatures() const noexcept { return creatures; }
+
+       void Atmosphere(int a) noexcept { atmosphere = a; }
+       int Atmosphere() const noexcept { return atmosphere; }
+       bool HasAtmosphere() const noexcept { return atmosphere >= 0; }
 
 private:
        void AddChild(Body &);
@@ -104,6 +118,9 @@ private:
        glm::dmat4 local;
        glm::dmat4 inverse_local;
 
+       std::vector<creature::Creature *> creatures;
+       int atmosphere;
+
 };
 
 }