Public Member Functions |
| | DtExampleSimulationConnection (makVrv::DtAgentManagerInterface &sceneInterface, const makVrv::DtCoordinateSystem &coordSystem, makVrv::DtSharedSettingsManager &settingsManager) |
| | CTOR param[in] sceneInterface is a reference to either a DtAgentManager or a DtAsynchronousManager, depending on whether or not this connection is going to be used in a separate thread param[in] coordSystem is cloned (not strictly necessary if used in the main thread, but it does it regardless param[in] settingsManager allows the objects using the connection to check for current settings that are maintained in the main thread.
|
| virtual | ~DtExampleSimulationConnection () |
| | DTOR.
|
| virtual bool | connect () |
| | Function that creates the sim engine.
|
| virtual bool | connected () const |
| | Terminate the connection.
|
| virtual bool | disconnect () |
| | Function that destroys the sim engine.
|
| virtual void | tick () |
| | Function to be called repeatedly by a thread.
|
| const makVrv::DtCoordinateSystem & | coordinateSystem () const |
| | Get the coordinate system.
|
| double | simTime () const |
| | Get the simulation time.
|
| void | setSimTime (double simTime) |
| | Set the simulation time.
|
DtExampleSimulationConnection.
We use the idea of a connection to provide some basic functionality that any object (potentially) running in a separate thread might need. A reference to the connection is typically passed to all objects that will execute in the thread, much the same way a reference to DtDe is passed to all objects executing in the main thread. It provides access to the scene interface, settings manager, element data reporting, and provides a common place to register singleton instances. This derived example connection clones the current coordinate system object on creation and makes that available as well. It also provides the link that let's us provide simulation time from the driver to the sim engine.
| DtExampleSimulationConnection::DtExampleSimulationConnection |
( |
makVrv::DtAgentManagerInterface & |
sceneInterface, |
|
|
const makVrv::DtCoordinateSystem & |
coordSystem, |
|
|
makVrv::DtSharedSettingsManager & |
settingsManager |
|
) |
| |
CTOR param[in] sceneInterface is a reference to either a DtAgentManager or a DtAsynchronousManager, depending on whether or not this connection is going to be used in a separate thread param[in] coordSystem is cloned (not strictly necessary if used in the main thread, but it does it regardless param[in] settingsManager allows the objects using the connection to check for current settings that are maintained in the main thread.
This includes access to a signaler that will raise signals (in whichever thread the connection is running in) when those settings change