![]() |
VR-Forces 5.0.1 Developer's Guide
|
VR-Forces maintains simulation time using an exercise clock, which is an instance of DtExerciseClock.
The clock keeps track of elapsed simulation time and simulated time of day. Elapsed simulation time is the amount of simulation time that has passed since the simulation started. VR-Forces represents the day/night cycle with the Time of Day value. By default, it starts at 12:00 noon, but can be set when you create a scenario. Time of day affects the simulation, for example, visual sensors are less able to detect objects at night than they are in the day.
Time is represented by the VR-Link DtTime type (in seconds), and is advanced when the clock is ticked. The exercise clock also provides static functions for converting seconds into the days:hours:minutes:seconds format.
The exercise clock supports several different modes of operation. The mode the clock is in determines how much simulation time is advanced when the clock is ticked. These modes are described in detail in "Representing and Managing Time in VR-Forces" in the VR-Forces Users Guide.
The exercise clock is owned by an instance of the network manager interface, DtNetworkManagerInterface. However, most classes should access the simulation time through the Simulation Services, DtSimulationServices.
For more on Simulation Services, see Simulation Services. For details on the Simulation Services functions related to simulation time, see Simulation Time Functions.