|
VR-Engage
2.2
|
This singleton class provides global state management and coordination for the VREngage Real-Time Dynamics (RTD) system. It manages the RTD world object, scenario event callbacks, configuration settings, and message logging.
#include <vreRtdGlobal.h>
Public Member Functions | |
| DtVreRtdGlobal () | |
| void | reset () |
| void | destroy () |
| void | resetRTDWorld () |
| void | destroyRTDWorld () |
| void | initializeCallbacks () |
| virtual void | processPreScenarioRollbackCallback () |
| virtual void | processPreLoadScenario () |
| virtual void | processPostLoadScenario () |
| virtual void | processScenarioRunCallback () |
| RTD::World * | rtdWorld () |
| RTD::World * | rtdWorld () const |
| void | setRtdWorld (RTD::World *val) |
| DtCgf * | cgf () const |
| DtCgf * | cgf () |
| void | setCgf (DtCgf *val) |
| smDouble | defaultRtdFixedDeltaTime () const |
| smDouble | defaultRtdFixedDeltaTime () |
| void | setDefaultRtdFixedDeltaTime (smDouble val) |
| bool | isTerrainQueryBlocking () const |
| bool | isTerrainQueryBlocking () |
| void | setTerrainQueryBlocking (bool val) |
| vreRtd::DtVreRtdPrinterListener * | printerListener () const |
| vreRtd::DtVreRtdPrinterListener * | printerListener () |
| void | setPrinterListener (vreRtd::DtVreRtdPrinterListener *val) |
Static Public Member Functions | |
| static void | pluginLibInit () |
| static DtVreRtdGlobal * | getInstance () |
| static void | preScenarioRollbackCallback (void *data) |
| static void | preLoadScenarioCallback (DtScenario &scenario, void *data) |
| static void | postLoadScenarioCallback (const DtScenario &scenario, void *data) |
| static void | scenarioRunCallback (void *data) |
Protected Attributes | |
| RTD::World * | myRtdWorld |
| bool | myTerrainQueryBlocking |
| DtCgf * | myCgf |
| smDouble | myDefaultRtdFixedDeltaTime |
| DtVreRtdPrinterListener * | myListener |
Static Protected Attributes | |
| static DtVreRtdGlobal * | theRtdGlobalInstance |
| vreRtd::DtVreRtdGlobal::DtVreRtdGlobal | ( | ) |
Constructor.
Initializes a new instance of the global RTD manager. Normally this should not be called directly - use getInstance() instead to access the singleton instance.
Referenced by getInstance().
|
static |
|
static |
Gets the singleton instance of the global RTD manager.
Returns the singleton instance of the global RTD manager, creating it if it doesn't already exist. This is the proper way to access the global RTD state.
References DtVreRtdGlobal().
Referenced by vreRtd::DtVreRtdTickCallback::callback().
| void vreRtd::DtVreRtdGlobal::reset | ( | ) |
| void vreRtd::DtVreRtdGlobal::destroy | ( | ) |
| void vreRtd::DtVreRtdGlobal::resetRTDWorld | ( | ) |
| void vreRtd::DtVreRtdGlobal::destroyRTDWorld | ( | ) |
Destroys the RTD world.
Completely destroys the RTD world and all its resources. This is more thorough than resetRTDWorld() and requires the world to be recreated before it can be used again.
| void vreRtd::DtVreRtdGlobal::initializeCallbacks | ( | ) |
Initializes the scenario event callbacks.
Sets up the callback functions that link the VRF scenario lifecycle events (load, run, reset) to the appropriate RTD system responses.
|
static |
Static callback for scenario rollback events.
| data | User data passed by the callback system |
Static callback function invoked before a scenario is rolled back. Routes the callback to the processPreScenarioRollbackCallback method.
|
virtual |
Processes a scenario rollback event.
Handles the pre-scenario rollback event, preparing the RTD system for the scenario to be rolled back to a previous state.
|
static |
Static callback for scenario load events.
| scenario | The scenario being loaded |
| data | User data passed by the callback system |
Static callback function invoked before a scenario is loaded. Routes the callback to the processPreLoadScenario method.
|
virtual |
Processes a scenario load event.
Handles the pre-load scenario event, preparing the RTD system for a new scenario to be loaded.
|
static |
Static callback after scenario load completes.
| scenario | The scenario that was loaded |
| data | User data passed by the callback system |
Static callback function invoked after a scenario is loaded. Routes the callback to the processPostLoadScenario method.
|
virtual |
Processes post-scenario load event.
Handles the post-load scenario event, finalizing RTD setup after a new scenario has been loaded.
|
static |
Static callback for scenario run events.
| data | User data passed by the callback system |
Static callback function invoked when a scenario starts running. Routes the callback to the processScenarioRunCallback method.
|
virtual |
Processes a scenario run event.
Handles the scenario run event, preparing the RTD system to begin active simulation.
|
inline |
Gets the RTD world object.
Returns the current RTD world object being used for simulation.
References myRtdWorld.
Referenced by vreRtd::DtVreRtdTickCallback::callback().
|
inline |
Gets the RTD world object (const version)
Returns the current RTD world object being used for simulation.
References myRtdWorld.
|
inline |
Sets the RTD world object.
| val | The new RTD world object |
Sets the RTD world object to be used for simulation.
References myRtdWorld.
|
inline |
Gets the CGF object (const version)
Returns the current CGF (Computer Generated Forces) object.
References myCgf.
|
inline |
Gets the CGF object.
Returns the current CGF (Computer Generated Forces) object.
References myCgf.
|
inline |
Sets the CGF object.
| val | The new CGF object |
Sets the CGF (Computer Generated Forces) object to be used.
References myCgf.
|
inline |
Gets the default RTD fixed delta time (const version)
Returns the default fixed delta time (in seconds) used for RTD simulation steps.
References myDefaultRtdFixedDeltaTime.
|
inline |
Gets the default RTD fixed delta time.
Returns the default fixed delta time (in seconds) used for RTD simulation steps.
References myDefaultRtdFixedDeltaTime.
|
inline |
Sets the default RTD fixed delta time.
| val | The new default fixed delta time value |
Sets the default fixed delta time (in seconds) used for RTD simulation steps.
References myDefaultRtdFixedDeltaTime.
|
inline |
Checks if terrain queries are blocking (const version)
Returns whether terrain queries are set to block until completed.
References myTerrainQueryBlocking.
|
inline |
Checks if terrain queries are blocking.
Returns whether terrain queries are set to block until completed.
References myTerrainQueryBlocking.
|
inline |
Sets whether terrain queries are blocking.
| val | True to make terrain queries blocking, false for non-blocking |
Sets whether terrain queries should block until completed or operate asynchronously.
References myTerrainQueryBlocking.
|
inline |
Gets the printer listener (const version)
Returns the current printer listener used for message forwarding.
References myListener.
|
inline |
Gets the printer listener.
Returns the current printer listener used for message forwarding.
References myListener.
|
inline |
Sets the printer listener.
| val | The new printer listener |
Sets the printer listener to be used for message forwarding.
References myListener.
|
staticprotected |
Singleton instance of the global RTD manager.
|
protected |
The RTD world object.
Referenced by rtdWorld(), rtdWorld(), and setRtdWorld().
|
protected |
Flag indicating whether terrain queries are blocking.
Referenced by isTerrainQueryBlocking(), isTerrainQueryBlocking(), and setTerrainQueryBlocking().
|
protected |
|
protected |
Default fixed delta time for RTD simulation steps.
Referenced by defaultRtdFixedDeltaTime(), defaultRtdFixedDeltaTime(), and setDefaultRtdFixedDeltaTime().
|
protected |
Printer listener for message forwarding.
Referenced by printerListener(), printerListener(), and setPrinterListener().