A simulated object. Register the object with a scene to get called back for Update, Pause, Resume and Stop.
More...
#include <C:/Trend/Development/Trax3/Code/trax/Simulated.h>
|
| virtual bool | Start (Scene &scene)=0 |
| | Called if the simulation is started.
|
| virtual void | Idle ()=0 |
| | Called during the simulation calculations, to perform tasks foreign to the physical simulation.
|
| virtual void | Update (Time dt=fixed_timestep)=0 |
| | Called to update the simulated object after the simuation step finishes.
|
|
virtual void | Pause () noexcept=0 |
| | Called if the simulation is paused.
|
|
virtual void | Resume () noexcept=0 |
| | Called if the simulation is resumed after pause.
|
|
virtual void | Stop () noexcept=0 |
| | Called if the simulation is stopped.
|
A simulated object. Register the object with a scene to get called back for Update, Pause, Resume and Stop.
◆ Idle()
| virtual void trax::Simulated::Idle |
( |
| ) |
|
|
pure virtual |
Called during the simulation calculations, to perform tasks foreign to the physical simulation.
This is meant for precalculating values for the next frame, but is not allowed to acces simulation data: no read/write poses or velocities of Bodies and Shapes or creation/deletion of objects created from the Scene interface.
◆ Start()
| virtual bool trax::Simulated::Start |
( |
Scene & | scene | ) |
|
|
pure virtual |
Called if the simulation is started.
- Parameters
-
| scene | The scene the simulation is started in. |
- Returns
- true if the simulated object wants to get called back for Update, Pause, Resume and Stop.
◆ Update()
Called to update the simulated object after the simuation step finishes.
- Parameters
-
| dt | The time step to update the object with. |
The documentation for this struct was generated from the following file: