X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FBody.hpp;h=5ac4fa1ddcfab52bf305b07825a03becff283612;hb=23f64a38a27866e88e87602cc6f8b11ef7173d6e;hp=5f82be232b4dc3e78029fd27338b122ab4a41421;hpb=98770f59a02c76f02de0a46ed36d9cfd52f5071b;p=blobs.git diff --git a/src/world/Body.hpp b/src/world/Body.hpp index 5f82be2..5ac4fa1 100644 --- a/src/world/Body.hpp +++ b/src/world/Body.hpp @@ -2,7 +2,7 @@ #define BLOBS_WORLD_BODY_HPP_ #include "Orbit.hpp" -#include "../graphics/glm.hpp" +#include "../math/glm.hpp" #include @@ -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 &Creatures() noexcept { return creatures; } + const std::vector &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 creatures; + int atmosphere; + }; }