#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 {
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;
};