![]() |
VR-Vantage 3.1.1 API Documentation
|
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. More...
Public Member Functions | |
| DtExampleSimEngine (makVrv::DtDe &de) | |
| CTOR. More... | |
| virtual | ~DtExampleSimEngine () |
| DTOR. More... | |
| bool | init () |
| Initialize the simulation engine. More... | |
| bool | uninit () |
| Destroy what was created in init() More... | |
| bool | tick (double simTime) |
| Perform updates param[in] simTime is he current simulation time. More... | |
| makVrv::DtEntity3dFacade * | facade () |
| DtExampleSimEngine (makVrv::DtDe &de) | |
| CTOR. More... | |
| virtual | ~DtExampleSimEngine () |
| DTOR. More... | |
| bool | init () |
| Initialize the simulation engine. More... | |
| bool | uninit () |
| Destroy what was created in init() More... | |
| bool | tick (double simTime) |
| Perform updates param[in] simTime is he current simulation time. More... | |
| DtExampleSimEngine (DtExampleSimulationConnection &connection) | |
| CTOR. More... | |
| virtual | ~DtExampleSimEngine () |
| DTOR. More... | |
| bool | init () |
| Initialize the simulation engine. More... | |
| bool | uninit () |
| Destroy what was created in init() More... | |
| bool | tick (double simTime) |
| Perform updates param[in] simTime is he current simulation time. More... | |
Protected Member Functions | |
| virtual void | setHoverSignalsActive (bool active) |
| Sets whether the sim engine is listening for mouseover events or not in its entity indicator. More... | |
| virtual void | setEntityInfoWidgetActive (bool active) |
| Sets whether the entity info widget is displayed or not. More... | |
| virtual makVrv::DtUnicode | generateInfoString () const |
| Generates the information string displayed in the entity info widget. More... | |
| virtual void | updatePosition (double simTime) |
| Updates the current position / orientation of the entity. More... | |
| virtual void | repositionAircraft (DtVector position, DtTaitBryan ori) |
| Positions the aircraft at the given position with the given orientation. More... | |
| virtual void | slot_coordinateSystemChanged () |
| slot for when the coordinate system changes More... | |
| virtual void | setHoverSignalsActive (bool active) |
| Sets whether the sim engine is listening for mouseover events or not. More... | |
| virtual void | setEntityInfoWidgetActive (bool active) |
| Sets whether the entity info widget is displayed or not. More... | |
| virtual makVrv::DtUnicode | generateInfoString () const |
| Generates the information string displayed in the info widget. More... | |
| virtual void | updatePosition (double simTime) |
| Updates the current position / orientation of the entity. More... | |
| virtual void | repositionAircraft (DtVector position, DtTaitBryan ori) |
| Positions the aircraft at the given position with the given orientation. More... | |
| virtual void | slot_coordinateSystemChanged () |
| slot for when the coordinate system changes More... | |
| void | slot_infoLabelsArePinned (const makVrv::DtSelectionManager::IdSet &pinOrUnpinList, bool pinAllLabels) |
| Boost slots. More... | |
| void | slot_infoLabelsArePinned (const makVrv::DtSelectionManager::IdSet &pinOrUnpinList, bool pinAllLabels) |
| Boost slots. More... | |
Protected Attributes | |
| makVrv::DtSignalConnectionManager | myConnections |
| DtExampleSimulationConnection & | mySimulationConnection |
| makVrv::DtDe & | myDe |
| local clone of the system wide coordinate system. More... | |
| makVrv::DtEntity3dFacade * | myEntityFacade |
| local clone of the system wide coordinate system. More... | |
| makVrv::DtEntityIndicatorWidget * | myEntityIndicator |
| local clone of the system wide coordinate system. More... | |
| makVrv::DtEntityInfoWidget * | myEntityInfoWidget |
| local clone of the system wide coordinate system. More... | |
| makVrv::DtEntityHATLineFacade * | myEntityHATLineFacade |
| local clone of the system wide coordinate system. More... | |
| std::string | myEntityDisplayName |
| local clone of the system wide coordinate system. More... | |
| bool | myEntityInfoWidgetPinnedFlag |
| local clone of the system wide coordinate system. More... | |
| DtTaitBryan | myOrientation |
| local clone of the system wide coordinate system. More... | |
| DtVector | myPosition |
| local clone of the system wide coordinate system. More... | |
| double | myHeading |
| local clone of the system wide coordinate system. More... | |
| double | myLastCommLineTime |
| local clone of the system wide coordinate system. More... | |
| double | myLastUpdateTime |
| local clone of the system wide coordinate system. More... | |
| DtVector | myOrbitCenter |
| local clone of the system wide coordinate system. More... | |
| double | myAngularVelocity |
| local clone of the system wide coordinate system. More... | |
| double | myClockAngle |
| local clone of the system wide coordinate system. More... | |
| double | myRadius |
| local clone of the system wide coordinate system. More... | |
| double | myRoll |
| local clone of the system wide coordinate system. More... | |
| makVrv::DtCoordinateSystem * | myCoordinateSystem = nullptr |
| local clone of the system wide coordinate system. More... | |
| makVrv::vrvSignalsLib::connection | myMouseEnterConnection |
| local clone of the system wide coordinate system. More... | |
| makVrv::vrvSignalsLib::connection | myMouseLeaveConnection |
| local clone of the system wide coordinate system. More... | |
| makVrv::DtSignalConnectionManager | mySignalConnections |
| local clone of the system wide coordinate system. More... | |
| void | slot_infoLabelsArePinned (const makVrv::DtSelectionManager::IdSet &pinOrUnpinList, bool pinAllLabels) |
| Boost slots. More... | |
| virtual void | setHoverSignalsActive (bool active) |
| Sets whether the sim engine is listening for mouseover events or not in its entity indicator. More... | |
| virtual void | setEntityInfoWidgetActive (bool active) |
| Sets whether the entity info widget is displayed or not. More... | |
| virtual makVrv::DtUnicode | generateInfoString () const |
| Generates the information string displayed in the entity info widget. More... | |
| virtual void | updatePosition (double simTime) |
| Updates the current position / orientation of the entity. More... | |
| virtual void | repositionAircraft (DtVector position, DtTaitBryan ori) |
| Positions the aircraft at the given position with the given orientation. More... | |
| virtual void | slot_coordinateSystemChanged () |
| slot for when the coordinate system changes More... | |
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.
| 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()
| bool DtExampleSimEngine::tick | ( | double | simTime | ) |
Perform updates param[in] simTime is he current simulation time.
|
inline |
References myEntityFacade.
|
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()
| bool DtExampleSimEngine::tick | ( | double | simTime | ) |
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()
| bool DtExampleSimEngine::tick | ( | double | simTime | ) |
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 |
|
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 |
local clone of the system wide coordinate system.
for thread safety.
|
protected |
local clone of the system wide coordinate system.
for thread safety.
|
protected |