![]() |
VR-Forces 5.0.2 Developer's Guide
|
Provide a basic sim engine to use in an example showing how to embed a sim engine into a driver that runs in a single thread.
Provide an example sim engine to use in an example showing how to embed a sim engine into a driver that runs in a separate thread.
The vast majority of this code is identical to the DtExampleSimEngine code in the exampleThreadedDriver example. Comparing the two is worthwhile. It creates an aircraft, with a HAT line and entity indicator, and updates it to fly in a circle and display the entity info widget when the mouse is over the entity indicator. The only significant difference between this code and the code in exampleThreadedDriver is that instead of using a connection, its using the display engine (DtDe) interface provided by the driver; and getting sim time from the DtDe instead of from the connection.
The vast majority of this code was extracted directly from DtExampleDriver. It creates an aircraft, with a HAT line and entity indicator, and updates it to fly in a circle and display the entity info widget when the mouse is over the entity indicator. The only significant difference between this code and the code extracted from exampleDriver is that instead of using the agent manager provided to the driver, its using the agent manager interface (sceneInterface()) provided by the connection; and getting sim time from the connection instead of from the DtDe. Note that we could have just grabbed clock time, but this demonstrates a way of moving this piece of data (sim time) from the driver to the connection.
Public Member Functions | |
| DtExampleSimEngine (makVrv::DtDe &de) | |
| virtual | ~DtExampleSimEngine () |
| bool | init () |
| bool | uninit () |
| bool | tick (double simTime) |
| DtExampleSimEngine (makVrv::DtDe &de) | |
| virtual | ~DtExampleSimEngine () |
| bool | init () |
| bool | uninit () |
| bool | tick (double simTime) |
| DtExampleSimEngine (DtExampleSimulationConnection &connection) | |
| virtual | ~DtExampleSimEngine () |
| bool | init () |
| bool | uninit () |
| bool | tick (double simTime) |
Protected Member Functions | |
| virtual void | setHoverSignalsActive (bool active) |
| virtual void | setEntityInfoWidgetActive (bool active) |
| virtual makVrv::DtUnicode | generateInfoString () const |
| virtual void | updatePosition (double simTime) |
| virtual void | repositionAircraft (DtVector position, DtTaitBryan ori) |
| virtual void | slot_coordinateSystemChanged () |
| virtual void | setHoverSignalsActive (bool active) |
| virtual void | setEntityInfoWidgetActive (bool active) |
| virtual makVrv::DtUnicode | generateInfoString () const |
| virtual void | updatePosition (double simTime) |
| virtual void | repositionAircraft (DtVector position, DtTaitBryan ori) |
| virtual void | slot_coordinateSystemChanged () |
| void | slot_infoLabelsArePinned (const makVrv::DtSelectionManager::IdSet &pinOrUnpinList, bool pinAllLabels) |
| void | slot_infoLabelsArePinned (const makVrv::DtSelectionManager::IdSet &pinOrUnpinList, bool pinAllLabels) |
| DtExampleSimEngine::DtExampleSimEngine | ( | makVrv::DtDe & | de | ) |
CTOR.
| [in] | de | is a a reference to the Display Engine |
|
virtual |
DTOR.
| DtExampleSimEngine::DtExampleSimEngine | ( | makVrv::DtDe & | de | ) |
CTOR.
| [in] | de | is a a reference to the Display Engine |
|
virtual |
DTOR.
| DtExampleSimEngine::DtExampleSimEngine | ( | DtExampleSimulationConnection & | connection | ) |
CTOR.
| [in] | connection | is an simple example connection object. |
|
virtual |
DTOR.
| bool DtExampleSimEngine::init | ( | ) |
Initialize the simulation engine. In this case, the entity facade, indicators, and hat line are created.
| bool DtExampleSimEngine::uninit | ( | ) |
Destroy what was created in init()
Perform updates param[in] simTime is he current simulation time.
|
protected |
Boost slots.
Slot called by signal to indicate that the label state was changed for the elements listed in the IdSet. If our element ID is among them, we will call setEntityInfoWidgetActive. param[in] pinOrUnpinList is the list of the currently selected elements param[in] pinAllLabels If true, the informative labels belonging to elements, whose element ids are specified in pinOrUnpinList, will be pinned. If false, the informative labels of those same elements will be unpinned.
|
protectedvirtual |
Sets whether the sim engine is listening for mouseover events or not in its entity indicator.
|
protectedvirtual |
Sets whether the entity info widget is displayed or not.
|
protectedvirtual |
Generates the information string displayed in the entity info widget.
|
protectedvirtual |
Updates the current position / orientation of the entity.
|
protectedvirtual |
Positions the aircraft at the given position with the given orientation.
|
protectedvirtual |
slot for when the coordinate system changes
| bool DtExampleSimEngine::init | ( | ) |
Initialize the simulation engine. In this case, the entity facade, indicators, and hat line are created.
| bool DtExampleSimEngine::uninit | ( | ) |
Destroy what was created in init()
Perform updates param[in] simTime is he current simulation time.
|
protected |
Boost slots.
Slot called by signal to indicate that the label state was changed for the elements listed in the IdSet. If our element ID is among them, we will call setEntityInfoWidgetActive. param[in] pinOrUnpinList is the list of the currently selected elements param[in] pinAllLabels If true, the informative labels belonging to elements, whose element ids are specified in pinOrUnpinList, will be pinned. If false, the informative labels of those same elements will be unpinned.
|
protectedvirtual |
Sets whether the sim engine is listening for mouseover events or not in its entity indicator.
|
protectedvirtual |
Sets whether the entity info widget is displayed or not.
|
protectedvirtual |
Generates the information string displayed in the entity info widget.
|
protectedvirtual |
Updates the current position / orientation of the entity.
|
protectedvirtual |
Positions the aircraft at the given position with the given orientation.
|
protectedvirtual |
slot for when the coordinate system changes
| bool DtExampleSimEngine::init | ( | ) |
Initialize the simulation engine. In this case, the entity facade, indicators, and hat line are created.
| bool DtExampleSimEngine::uninit | ( | ) |
Destroy what was created in init()
Perform updates param[in] simTime is he current simulation time.
|
protected |
Boost slots.
Slot called by signal to indicate that the label state was changed for the elements listed in the IdSet. If our element ID is among them, we will call setEntityInfoWidgetActive. param[in] pinOrUnpinList is the list of the currently selected elements param[in] pinAllLabels If true, the informative labels belonging to elements, whose element ids are specified in pinOrUnpinList, will be pinned. If false, the informative labels of those same elements will be unpinned.
|
protectedvirtual |
Sets whether the sim engine is listening for mouseover events or not.
|
protectedvirtual |
Sets whether the entity info widget is displayed or not.
|
protectedvirtual |
Generates the information string displayed in the info widget.
|
protectedvirtual |
Updates the current position / orientation of the entity.
|
protectedvirtual |
Positions the aircraft at the given position with the given orientation.
|
protectedvirtual |
slot for when the coordinate system changes
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |
local clone of the system wide coordinate system. for thread safety.
|
protected |