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.
|
Detailed Description
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.
Constructor & Destructor Documentation
| DtStateViewDriver::DtStateViewDriver |
( |
DtAgentManager & |
agentManager, |
|
|
const std::string & |
instanceName |
|
) |
| |
| virtual DtStateViewDriver::~DtStateViewDriver |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual const std::string& DtStateViewDriver::className |
( |
| ) |
const |
|
virtual |
Get the class name as a string.
| virtual bool DtStateViewDriver::onStart |
( |
| ) |
|
|
protectedvirtual |
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
| virtual bool DtStateViewDriver::onStop |
( |
| ) |
|
|
protectedvirtual |
Called when the driver is stopped by the display engine.
| virtual void DtStateViewDriver::slot_displayEngineAdded |
( |
const DtDeRecord & |
igRecord | ) |
|
|
protectedvirtual |
Called when a display engine is connected; restarts the driver.
| virtual bool DtStateViewDriver::onTick |
( |
| ) |
|
|
protectedvirtual |
Stub implementation since this driver doesn't have anything that needs updating.
| virtual void DtStateViewDriver::handleAttachToChanged |
( |
DtObserver * |
observer | ) |
|
|
protectedvirtual |
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 | ) |
|
|
protectedvirtual |
Called when the currently active state view emits an update.
| virtual void DtStateViewDriver::slot_simObjectRemoved |
( |
DtSimObjectEntry & |
| ) |
|
|
protectedvirtual |
Called when a sim object is removed, so its state view can be removed from the cache if present.
Member Data Documentation
| DtVrlinkEntityStateView* DtStateViewDriver::myStateView |
|
protected |
The currently active state view.
The documentation for this class was generated from the following file:
- /exports/nfedora7-1/nightly/docs/vrforcesDevelopment.tot/examples/exampleSimData/DtStateViewDriver.h