Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
iv_components
Simulation
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
12
class
Simulation
:
protected
iv::FixedUpdateClient
13
{
14
public
:
15
iv::ClientMarker
cm
;
16
using
iv::FixedUpdateClient::instance
;
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;
29
iv::FunctorActivatorField
on_end;
30
iv::FunctorField< bool >
on_pause;
31
bool
needs_reset;
32
};
33
34
}