![]() |
VR-Forces 5.0.3 Developer's Guide
|
This section describes a layer of services that various managers and modules in the simulation engine provide.
These simulation services are accessible through the DtSimulationServices class. A single instance of this class is created by the sim engine and servies as a central access point for these services. It is designed to be thread safe, so that these services may all be called from within any DtSimComponent subclasses without any locking.
Each VR-Forces application has a Simulation Manager (DtSimManager). The Simulation Manager maintains the exercise time, a scheduler, and the other managers and services that may be accessed through the DtSimulationServices instance. While these services are also available directly from the DtSimManager, it is recommended that DtSimulationServices be used whenever possible, as it provides a thread-safe interface that is not guaranteed by using the DtSimManager directly.
Each time the Simulation Manager’s tick() function is called, it does the following:
The Simulation Manager is one of the top-level classes maintained by the DtCgf class. You can obtain a pointer to it through DtCgf::simManager().
DtSimulationServices provides access to information and tools related to the execution of the simulation. This includes a number of functions related to the simulation time and frame time, the current time multiplier, a scheduler for processing timed events, tick callback function registration, and access to the callback queues that manage parallel processing of sim component execution.
These services provide access to sim engine settings that may be configured by the user, either at run-time through the VR-Forces GUI or at start-up using a configuration file or command line parameters.
The communication services provide the ability for the sim engine to communicate with other applications. The communication services include:
These services pertain to controlling the operation of the scenario.
These services manage the simulation objects in the sim engine. They are used to create, store, and provide access to information on each object known by the sim engine. They also provide access to information regarding the configuration of objects. For more on VR-Forces objects, see Simulation Object Design.
These services are responsible for the simulated environment and the events that happen within it. This covers a wide range of services, such as fire and detonation events, the terrain and the physical world, special simulation zones, and more.