#include <Simulation.h>
Public Member Functions | |
| Simulation () | |
| ~Simulation () | |
| void | setBasePhyStep (double step) |
| UINT | getBasePhyStep () const |
| double | getCurPhyStep () const |
| Returns the size (in seconds) of the steps, regardless of the pause state. | |
| double | getCurPhyNbStepsPerSec () const |
| Returns the number of steps per second, regardless of the pause state. | |
| double | getPhySpeedNum () const |
| Time multiplier that affect the number of steps (Computes more or less steps). | |
| void | setPhySpeedNum (double factor) |
| double | getPhySpeedStep () const |
| Time multiplier that affect the step size (Computes larger or smaller steps). | |
| void | setPhySpeedStep (double factor) |
| bool | isPaused () const |
| Maximum delay between two frames, else consider the computer had a slowdown and do not compute physics. | |
| void | pause (bool set=true) |
| void | togglePause () |
| void | addOrSetCallback (SimulationCallback *_pCB) |
Public Attributes | |
| osg::observer_ptr < SimulationCallback > | pCB |
| Callback called when data change. | |
Protected Attributes | |
| double | basePhyStep |
| Physics base step size (Second). | |
| double | phySpeedNum |
| double | phySpeedStep |
| bool | paused |
Definition at line 50 of file Simulation.h.
| Simulation::Simulation | ( | ) |
Definition at line 35 of file Simulation.cpp.
References DEFAULT_BASE_PHY_STEP, and setBasePhyStep().
| Simulation::~Simulation | ( | ) |
Definition at line 39 of file Simulation.cpp.
| void Simulation::addOrSetCallback | ( | SimulationCallback * | _pCB | ) | [inline] |
Definition at line 125 of file Simulation.h.
| UINT Simulation::getBasePhyStep | ( | ) | const [inline] |
Definition at line 71 of file Simulation.h.
| double Simulation::getCurPhyNbStepsPerSec | ( | ) | const [inline] |
Returns the number of steps per second, regardless of the pause state.
Definition at line 76 of file Simulation.h.
| double Simulation::getCurPhyStep | ( | ) | const [inline] |
Returns the size (in seconds) of the steps, regardless of the pause state.
Definition at line 74 of file Simulation.h.
Referenced by Ammo::hitBefore().
| double Simulation::getPhySpeedNum | ( | ) | const [inline] |
Time multiplier that affect the number of steps (Computes more or less steps).
Definition at line 82 of file Simulation.h.
| double Simulation::getPhySpeedStep | ( | ) | const [inline] |
Time multiplier that affect the step size (Computes larger or smaller steps).
Definition at line 97 of file Simulation.h.
| bool Simulation::isPaused | ( | ) | const [inline] |
Maximum delay between two frames, else consider the computer had a slowdown and do not compute physics.
Definition at line 118 of file Simulation.h.
| void Simulation::pause | ( | bool | set = true |
) | [inline] |
Definition at line 119 of file Simulation.h.
| void Simulation::setBasePhyStep | ( | double | step | ) | [inline] |
| void Simulation::setPhySpeedNum | ( | double | factor | ) | [inline] |
Definition at line 83 of file Simulation.h.
| void Simulation::setPhySpeedStep | ( | double | factor | ) | [inline] |
Definition at line 98 of file Simulation.h.
| void Simulation::togglePause | ( | ) | [inline] |
Definition at line 120 of file Simulation.h.
double Simulation::basePhyStep [protected] |
bool Simulation::paused [protected] |
Definition at line 135 of file Simulation.h.
| osg::observer_ptr<SimulationCallback> Simulation::pCB |
double Simulation::phySpeedNum [protected] |
Definition at line 133 of file Simulation.h.
double Simulation::phySpeedStep [protected] |
Definition at line 134 of file Simulation.h.
1.5.9