namespace blobs {
namespace world {
-Simulation::Simulation(Body &r)
+Simulation::Simulation(Body &r, app::Assets &assets)
: root(r)
+, assets(assets)
, bodies()
, planets()
, suns()
suns.insert(&s);
}
-void Simulation::Tick() {
- constexpr double dt = 0.01666666666666666666666666666666;
+void Simulation::Tick(double dt) {
time += dt;
for (auto body : bodies) {
- body->Rotation(body->Rotation() + dt * body->AngularMomentum() / body->Inertia());
- body->Cache();
+ body->Tick(dt);
}
}