X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FSimulation.hpp;h=ea81de5ba226fcc812491aa18bbc44e8c704e361;hb=cacc0641e5174d8b46e7a7086be6a45c87ab3642;hp=3025a745b5bebb3665174e3599faf99a4c8cccdf;hpb=c5556cf5f6813887a3503433c021ccd2e7fae865;p=blobs.git diff --git a/src/world/Simulation.hpp b/src/world/Simulation.hpp index 3025a74..ea81de5 100644 --- a/src/world/Simulation.hpp +++ b/src/world/Simulation.hpp @@ -1,13 +1,15 @@ #ifndef BLOBS_WORLD_SIMULATION_HPP_ #define BLOBS_WORLD_SIMULATION_HPP_ -#include +#include namespace blobs { namespace world { class Body; +class Planet; +class Sun; class Simulation { @@ -25,15 +27,23 @@ public: void Tick(); void AddBody(Body &); + void AddPlanet(Planet &); + void AddSun(Sun &); - Body &Root() { return root; } - const Body &Root() const { return root; } + 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::vector all_bodies; + std::set bodies; + std::set planets; + std::set suns; double time; };