X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FSimulation.hpp;h=ea81de5ba226fcc812491aa18bbc44e8c704e361;hb=bcf776b6d51aeb9147bde32da8dd0768b10db993;hp=2acf54981b29b9bc04177a44a9b5cd84256503ca;hpb=be413456f57da06e918ae7bf4c4f35e5198ff7ce;p=blobs.git diff --git a/src/world/Simulation.hpp b/src/world/Simulation.hpp index 2acf549..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,11 +26,25 @@ 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; };