VR-Engage  2.2
Loading...
Searching...
No Matches
vreRtd::DtVreRtdGlobal Class Reference

Detailed Description

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::DtVreRtdPrinterListenerprinterListener () const
 
vreRtd::DtVreRtdPrinterListenerprinterListener ()
 
void setPrinterListener (vreRtd::DtVreRtdPrinterListener *val)
 

Static Public Member Functions

static void pluginLibInit ()
 
static DtVreRtdGlobalgetInstance ()
 
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
 
DtVreRtdPrinterListenermyListener
 

Static Protected Attributes

static DtVreRtdGlobaltheRtdGlobalInstance
 

Constructor & Destructor Documentation

◆ DtVreRtdGlobal()

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().

Member Function Documentation

◆ pluginLibInit()

static void vreRtd::DtVreRtdGlobal::pluginLibInit ( )
static

Initializes the RTD plugin library.

Performs one-time initialization of the RTD plugin library, setting up global resources and configurations. This should be called once during application startup before using any RTD functionality.

◆ getInstance()

static DtVreRtdGlobal * vreRtd::DtVreRtdGlobal::getInstance ( )
static

Gets the singleton instance of the global RTD manager.

Returns
Pointer to the singleton instance

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().

◆ reset()

void vreRtd::DtVreRtdGlobal::reset ( )

Resets the global RTD state.

Resets the global RTD state to its initial configuration, clearing any existing world state but preserving the RTD world object itself.

◆ destroy()

void vreRtd::DtVreRtdGlobal::destroy ( )

Destroys the global RTD manager.

Completely destroys the global RTD manager and all its resources, including the RTD world object. This should be called during application shutdown to ensure proper cleanup.

◆ resetRTDWorld()

void vreRtd::DtVreRtdGlobal::resetRTDWorld ( )

Resets the RTD world.

Resets just the RTD world to its initial state, clearing all simulation objects but preserving the world configuration.

◆ destroyRTDWorld()

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.

◆ initializeCallbacks()

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.

◆ preScenarioRollbackCallback()

static void vreRtd::DtVreRtdGlobal::preScenarioRollbackCallback ( void * data)
static

Static callback for scenario rollback events.

Parameters
dataUser data passed by the callback system

Static callback function invoked before a scenario is rolled back. Routes the callback to the processPreScenarioRollbackCallback method.

◆ processPreScenarioRollbackCallback()

virtual void vreRtd::DtVreRtdGlobal::processPreScenarioRollbackCallback ( )
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.

◆ preLoadScenarioCallback()

static void vreRtd::DtVreRtdGlobal::preLoadScenarioCallback ( DtScenario & scenario,
void * data )
static

Static callback for scenario load events.

Parameters
scenarioThe scenario being loaded
dataUser data passed by the callback system

Static callback function invoked before a scenario is loaded. Routes the callback to the processPreLoadScenario method.

◆ processPreLoadScenario()

virtual void vreRtd::DtVreRtdGlobal::processPreLoadScenario ( )
virtual

Processes a scenario load event.

Handles the pre-load scenario event, preparing the RTD system for a new scenario to be loaded.

◆ postLoadScenarioCallback()

static void vreRtd::DtVreRtdGlobal::postLoadScenarioCallback ( const DtScenario & scenario,
void * data )
static

Static callback after scenario load completes.

Parameters
scenarioThe scenario that was loaded
dataUser data passed by the callback system

Static callback function invoked after a scenario is loaded. Routes the callback to the processPostLoadScenario method.

◆ processPostLoadScenario()

virtual void vreRtd::DtVreRtdGlobal::processPostLoadScenario ( )
virtual

Processes post-scenario load event.

Handles the post-load scenario event, finalizing RTD setup after a new scenario has been loaded.

◆ scenarioRunCallback()

static void vreRtd::DtVreRtdGlobal::scenarioRunCallback ( void * data)
static

Static callback for scenario run events.

Parameters
dataUser data passed by the callback system

Static callback function invoked when a scenario starts running. Routes the callback to the processScenarioRunCallback method.

◆ processScenarioRunCallback()

virtual void vreRtd::DtVreRtdGlobal::processScenarioRunCallback ( )
virtual

Processes a scenario run event.

Handles the scenario run event, preparing the RTD system to begin active simulation.

◆ rtdWorld() [1/2]

RTD::World * vreRtd::DtVreRtdGlobal::rtdWorld ( )
inline

Gets the RTD world object.

Returns
Pointer to the RTD world

Returns the current RTD world object being used for simulation.

References myRtdWorld.

Referenced by vreRtd::DtVreRtdTickCallback::callback().

◆ rtdWorld() [2/2]

RTD::World * vreRtd::DtVreRtdGlobal::rtdWorld ( ) const
inline

Gets the RTD world object (const version)

Returns
Const pointer to the RTD world

Returns the current RTD world object being used for simulation.

References myRtdWorld.

◆ setRtdWorld()

void vreRtd::DtVreRtdGlobal::setRtdWorld ( RTD::World * val)
inline

Sets the RTD world object.

Parameters
valThe new RTD world object

Sets the RTD world object to be used for simulation.

References myRtdWorld.

◆ cgf() [1/2]

DtCgf * vreRtd::DtVreRtdGlobal::cgf ( ) const
inline

Gets the CGF object (const version)

Returns
Const pointer to the CGF object

Returns the current CGF (Computer Generated Forces) object.

References myCgf.

◆ cgf() [2/2]

DtCgf * vreRtd::DtVreRtdGlobal::cgf ( )
inline

Gets the CGF object.

Returns
Pointer to the CGF object

Returns the current CGF (Computer Generated Forces) object.

References myCgf.

◆ setCgf()

void vreRtd::DtVreRtdGlobal::setCgf ( DtCgf * val)
inline

Sets the CGF object.

Parameters
valThe new CGF object

Sets the CGF (Computer Generated Forces) object to be used.

References myCgf.

◆ defaultRtdFixedDeltaTime() [1/2]

smDouble vreRtd::DtVreRtdGlobal::defaultRtdFixedDeltaTime ( ) const
inline

Gets the default RTD fixed delta time (const version)

Returns
The default fixed delta time value

Returns the default fixed delta time (in seconds) used for RTD simulation steps.

References myDefaultRtdFixedDeltaTime.

◆ defaultRtdFixedDeltaTime() [2/2]

smDouble vreRtd::DtVreRtdGlobal::defaultRtdFixedDeltaTime ( )
inline

Gets the default RTD fixed delta time.

Returns
The default fixed delta time value

Returns the default fixed delta time (in seconds) used for RTD simulation steps.

References myDefaultRtdFixedDeltaTime.

◆ setDefaultRtdFixedDeltaTime()

void vreRtd::DtVreRtdGlobal::setDefaultRtdFixedDeltaTime ( smDouble val)
inline

Sets the default RTD fixed delta time.

Parameters
valThe new default fixed delta time value

Sets the default fixed delta time (in seconds) used for RTD simulation steps.

References myDefaultRtdFixedDeltaTime.

◆ isTerrainQueryBlocking() [1/2]

bool vreRtd::DtVreRtdGlobal::isTerrainQueryBlocking ( ) const
inline

Checks if terrain queries are blocking (const version)

Returns
True if terrain queries are blocking, false otherwise

Returns whether terrain queries are set to block until completed.

References myTerrainQueryBlocking.

◆ isTerrainQueryBlocking() [2/2]

bool vreRtd::DtVreRtdGlobal::isTerrainQueryBlocking ( )
inline

Checks if terrain queries are blocking.

Returns
True if terrain queries are blocking, false otherwise

Returns whether terrain queries are set to block until completed.

References myTerrainQueryBlocking.

◆ setTerrainQueryBlocking()

void vreRtd::DtVreRtdGlobal::setTerrainQueryBlocking ( bool val)
inline

Sets whether terrain queries are blocking.

Parameters
valTrue to make terrain queries blocking, false for non-blocking

Sets whether terrain queries should block until completed or operate asynchronously.

References myTerrainQueryBlocking.

◆ printerListener() [1/2]

vreRtd::DtVreRtdPrinterListener * vreRtd::DtVreRtdGlobal::printerListener ( ) const
inline

Gets the printer listener (const version)

Returns
Const pointer to the printer listener

Returns the current printer listener used for message forwarding.

References myListener.

◆ printerListener() [2/2]

vreRtd::DtVreRtdPrinterListener * vreRtd::DtVreRtdGlobal::printerListener ( )
inline

Gets the printer listener.

Returns
Pointer to the printer listener

Returns the current printer listener used for message forwarding.

References myListener.

◆ setPrinterListener()

void vreRtd::DtVreRtdGlobal::setPrinterListener ( vreRtd::DtVreRtdPrinterListener * val)
inline

Sets the printer listener.

Parameters
valThe new printer listener

Sets the printer listener to be used for message forwarding.

References myListener.

Member Data Documentation

◆ theRtdGlobalInstance

DtVreRtdGlobal* vreRtd::DtVreRtdGlobal::theRtdGlobalInstance
staticprotected

Singleton instance of the global RTD manager.

◆ myRtdWorld

RTD::World* vreRtd::DtVreRtdGlobal::myRtdWorld
protected

The RTD world object.

Referenced by rtdWorld(), rtdWorld(), and setRtdWorld().

◆ myTerrainQueryBlocking

bool vreRtd::DtVreRtdGlobal::myTerrainQueryBlocking
protected

Flag indicating whether terrain queries are blocking.

Referenced by isTerrainQueryBlocking(), isTerrainQueryBlocking(), and setTerrainQueryBlocking().

◆ myCgf

DtCgf* vreRtd::DtVreRtdGlobal::myCgf
protected

Pointer to the CGF object.

Referenced by cgf(), cgf(), and setCgf().

◆ myDefaultRtdFixedDeltaTime

smDouble vreRtd::DtVreRtdGlobal::myDefaultRtdFixedDeltaTime
protected

Default fixed delta time for RTD simulation steps.

Referenced by defaultRtdFixedDeltaTime(), defaultRtdFixedDeltaTime(), and setDefaultRtdFixedDeltaTime().

◆ myListener

DtVreRtdPrinterListener* vreRtd::DtVreRtdGlobal::myListener
protected

Printer listener for message forwarding.

Referenced by printerListener(), printerListener(), and setPrinterListener().


The documentation for this class was generated from the following file: