]> git.localhorst.tv Git - blobs.git/blobdiff - src/world/Simulation.hpp
(slightly) better camera handling
[blobs.git] / src / world / Simulation.hpp
index 3025a745b5bebb3665174e3599faf99a4c8cccdf..ea81de5ba226fcc812491aa18bbc44e8c704e361 100644 (file)
@@ -1,13 +1,15 @@
 #ifndef BLOBS_WORLD_SIMULATION_HPP_
 #define BLOBS_WORLD_SIMULATION_HPP_
 
-#include <vector>
+#include <set>
 
 
 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<Body *> &Bodies() const noexcept { return bodies; }
+       const std::set<Planet *> &Planets() const noexcept { return planets; }
+       const std::set<Sun *> &Suns() const noexcept { return suns; }
 
        double Time() const noexcept { return time; }
 
 private:
        Body &root;
-       std::vector<Body *> all_bodies;
+       std::set<Body *> bodies;
+       std::set<Planet *> planets;
+       std::set<Sun *> suns;
        double time;
 
 };