X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FSimulation.hpp;h=ea81de5ba226fcc812491aa18bbc44e8c704e361;hb=bcf776b6d51aeb9147bde32da8dd0768b10db993;hp=6d22ed3ef9e5087f886e2f1c62e94ef34af57aea;hpb=0453d6da05d4b29d953f00857d743310d9344ce0;p=blobs.git diff --git a/src/world/Simulation.hpp b/src/world/Simulation.hpp index 6d22ed3..ea81de5 100644 --- a/src/world/Simulation.hpp +++ b/src/world/Simulation.hpp @@ -1,11 +1,15 @@ #ifndef BLOBS_WORLD_SIMULATION_HPP_ #define BLOBS_WORLD_SIMULATION_HPP_ +#include + namespace blobs { namespace world { class Body; +class Planet; +class Sun; class Simulation { @@ -22,13 +26,24 @@ public: public: void Tick(); - Body &Root() { return root; } - const Body &Root() const { return root; } + void AddBody(Body &); + void AddPlanet(Planet &); + void AddSun(Sun &); + + Body &Root() noexcept { return root; } + const Body &Root() const noexcept { return root; } + + const std::set &Bodies() const noexcept { return bodies; } + const std::set &Planets() const noexcept { return planets; } + const std::set &Suns() const noexcept { return suns; } double Time() const noexcept { return time; } private: Body &root; + std::set bodies; + std::set planets; + std::set suns; double time; };