|
VR-Engage
2.2
|
This singleton class manages the periodic updating of RTD simulation states during each simulation frame. It synchronizes the time between the RTD and VRF systems, and handles environmental updates such as wind conditions.
#include <vreRtdTickCallback.h>
Public Member Functions | |
| DtVreRtdTickCallback () | |
| void | updateWind () |
Static Public Member Functions | |
| static void | callback (void *usr) |
| static DtVreRtdTickCallback * | getInstance () |
Public Attributes | |
| smReal | myFrameTimestamp |
| double | myCurWindDir |
| double | myCurWindSpeed |
Static Public Attributes | |
| static DtVreRtdTickCallback * | theInstance |
|
inline |
Default constructor.
Initializes a new tick callback handler with default values.
References myCurWindDir, myCurWindSpeed, and myFrameTimestamp.
Referenced by callback(), and getInstance().
|
inlinestatic |
Static callback function for frame ticks.
| usr | User data pointer (points to the tick callback instance) |
Called once per simulation frame to update the RTD world. This function synchronizes the RTD simulation time with the VRF exercise time and performs one or more RTD world updates as needed to keep the systems in sync.
References DtVreRtdTickCallback(), vreRtd::DtVreRtdGlobal::getInstance(), vreRtd::DtVreRtdGlobal::rtdWorld(), and updateWind().
|
inlinestatic |
Gets the singleton instance of the tick callback handler.
Returns the singleton instance of the tick callback handler, creating it if it doesn't already exist. This is the proper way to access the tick callback handler.
References DtVreRtdTickCallback(), and theInstance.
| void vreRtd::DtVreRtdTickCallback::updateWind | ( | ) |
Updates the current wind conditions.
Updates the current wind direction and speed from the environment. This is called once per frame during the tick callback.
Referenced by callback().
|
static |
Singleton instance of the tick callback handler.
Referenced by getInstance().
| smReal vreRtd::DtVreRtdTickCallback::myFrameTimestamp |
Timestamp of the current frame.
Stores the timestamp of the current frame for time synchronization.
Referenced by DtVreRtdTickCallback().
| double vreRtd::DtVreRtdTickCallback::myCurWindDir |
Current wind direction in radians.
Referenced by DtVreRtdTickCallback().
| double vreRtd::DtVreRtdTickCallback::myCurWindSpeed |
Current wind speed in meters per second.
Referenced by DtVreRtdTickCallback().