Simulation.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "SimulationState.hpp"
4 #include <ivorium.hpp>
5 
6 namespace comp
7 {
8 
13 {
14 public:
17 
18  Simulation( iv::Instance * inst, SimulationState * sim, iv::TimeId time_id );
19 
20  virtual void simulation_reset() = 0;
21  virtual void simulation_step( int step_ms ) = 0;
22 
23 private:
24  virtual void fixed_update( iv::TimeId time, int time_step, int steps ) override;
25 
26 private:
27  SimulationState * sim;
28  iv::FunctorActivatorField on_restart;
30  iv::FunctorField< bool > on_pause;
31  bool needs_reset;
32 };
33 
34 }