65 virtual void Pause() noexcept = 0;
74 virtual
void Stop() noexcept = 0;
81 template<class BaseDecorator>
84 using BaseDecorator::m_pComponent;
92 : BaseDecorator{ pComponent }
96 return m_pComponent->Start( scene );
100 return m_pComponent->Idle();
104 m_pComponent->Update( dt );
107 void Pause() noexcept
override{
108 m_pComponent->Pause();
111 void Resume() noexcept
override{
112 m_pComponent->Resume();
115 void Stop() noexcept
override{
116 m_pComponent->Stop();
SimulatedDecorator(std::shared_ptr< InterfaceType > pComponent)
Decorator constructor.
Definition Simulated.h:91
BaseDecorator::InterfaceType InterfaceType
Type of the interface the decorator is decorating.
Definition Simulated.h:87
Value< Dimension< 0, 0, 1 > > Time
Time.
Definition DimensionedValues.h:329
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
constexpr Time fixed_timestep
The fixed timestep to use with the simulation.
Definition Units.h:136
A physical simulation scene for running a simulation and creating physical objects in the scene.
Definition Scene.h:72
A simulated object. Register the object with a scene to get called back for Update,...
Definition Simulated.h:39
virtual void Update(Time dt=fixed_timestep)=0
Called to update the simulated object after the simuation step finishes.
virtual bool Start(Scene &scene)=0
Called if the simulation is started.
virtual void Resume() noexcept=0
Called if the simulation is resumed after pause.
virtual void Stop() noexcept=0
Called if the simulation is stopped.
virtual void Idle()=0
Called during the simulation calculations, to perform tasks foreign to the physical simulation.
virtual void Pause() noexcept=0
Called if the simulation is paused.