![]() |
VR-Forces 4.0.4 Class Documentation
|
This driver illustrates the use of state views to access sim data. More...

Public Member Functions | |
| DtStateViewDriver (DtAgentManager &agentManager, const std::string &instanceName) | |
| CTOR. | |
| virtual | ~DtStateViewDriver () |
| DTOR. | |
| virtual const std::string & | className () const |
| Get the class name as a string. | |
Protected Member Functions | |
| virtual bool | onStart () |
| When late-joining display engines are connected to the master display engine, all drivers are stopped and restarted. | |
| virtual bool | onStop () |
| Called when the driver is stopped by the display engine. | |
| virtual void | slot_displayEngineAdded (const DtDeRecord &igRecord) |
| Called when a display engine is connected; restarts the driver. | |
| virtual bool | onTick () |
| Stub implementation since this driver doesn't have anything that needs updating. | |
| virtual void | handleAttachToChanged (DtObserver *observer) |
| Called by signal when an observer's attachment changes; used as a cue to start listening to the attached entity's state. | |
| DtSimEntry * | findSimEntry (DtUniqueID elementId) |
| Find a sim entry corresponding to a visual object's unique element ID. | |
| void | disableCurrentStateView () |
| Disables the currently active state view. | |
| virtual void | slot_stateViewUpdated (DtVrlinkEntityStateView *stateView) |
| Called when the currently active state view emits an update. | |
| virtual void | slot_simObjectRemoved (DtSimObjectEntry &) |
| Called when a sim object is removed, so its state view can be removed from the cache if present. | |
Protected Attributes | |
| DtVrlinkEntityStateView * | myStateView |
| The currently active state view. | |
This driver illustrates the use of state views to access sim data.
When the DtAttachManager emits its attachment changed signal, the DtStateViewDriver will get a state view onto the currently attached entity and print out some information from the sim state at a 1hz update rate.
| DtStateViewDriver::DtStateViewDriver | ( | DtAgentManager & | agentManager, |
| const std::string & | instanceName | ||
| ) |
CTOR.
| virtual DtStateViewDriver::~DtStateViewDriver | ( | ) | [virtual] |
DTOR.
| virtual const std::string& DtStateViewDriver::className | ( | ) | const [virtual] |
Get the class name as a string.
Implements makVrv::DtDriver.
| virtual bool DtStateViewDriver::onStart | ( | ) | [protected, virtual] |
When late-joining display engines are connected to the master display engine, all drivers are stopped and restarted.
It is critical to implement these methods correctly to make late-joining display engines work correctly. Called when the driver is started by the display engine Restores state that existed the last time the driver was stopped
Implements makVrv::DtDriver.
| virtual bool DtStateViewDriver::onStop | ( | ) | [protected, virtual] |
Called when the driver is stopped by the display engine.
Implements makVrv::DtDriver.
| virtual void DtStateViewDriver::slot_displayEngineAdded | ( | const DtDeRecord & | igRecord | ) | [protected, virtual] |
Called when a display engine is connected; restarts the driver.
Reimplemented from makVrv::DtDriver.
| virtual bool DtStateViewDriver::onTick | ( | ) | [protected, virtual] |
Stub implementation since this driver doesn't have anything that needs updating.
Implements makVrv::DtDriver.
| virtual void DtStateViewDriver::handleAttachToChanged | ( | DtObserver * | observer | ) | [protected, virtual] |
Called by signal when an observer's attachment changes; used as a cue to start listening to the attached entity's state.
| DtSimEntry* DtStateViewDriver::findSimEntry | ( | DtUniqueID | elementId | ) | [protected] |
Find a sim entry corresponding to a visual object's unique element ID.
| void DtStateViewDriver::disableCurrentStateView | ( | ) | [protected] |
Disables the currently active state view.
| virtual void DtStateViewDriver::slot_stateViewUpdated | ( | DtVrlinkEntityStateView * | stateView | ) | [protected, virtual] |
Called when the currently active state view emits an update.
| virtual void DtStateViewDriver::slot_simObjectRemoved | ( | DtSimObjectEntry & | ) | [protected, virtual] |
Called when a sim object is removed, so its state view can be removed from the cache if present.
DtVrlinkEntityStateView* DtStateViewDriver::myStateView [protected] |
The currently active state view.