VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtStateViewDriver Class Reference

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.

Inheritance diagram for DtStateViewDriver:
Inheritance graph
[legend]

Public Member Functions

 DtStateViewDriver (DtAgentManager &agentManager, const std::string &instanceName)
 
virtual ~DtStateViewDriver ()
 
virtual const std::string & className () const
 
- Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 
virtual ~DtDriver ()
 
virtual void realizeConfiguration (const DtConfiguration &configuration)
 
virtual DtConfiguration createConfiguration () const
 
DtAgentManageragentManager ()
 
virtual DtAgentManagerInterfacesceneInterface ()
 
bool started () const
 
virtual const std::string & instanceName () const
 
virtual bool autoStart () const
 
virtual void setAutoStart (bool autoStart)
 
virtual bool isWindowDependent () const
 
virtual void setIsWindowDependent (bool dep)
 
virtual void setIsUserControllable (bool)
 
virtual bool isUserControllable () const
 
virtual void setIsPersistent (bool per)
 
virtual bool isPersistent () const
 
virtual bool isOnDriverSelectionList () const
 
virtual void setOnDriverSelectionList (bool)
 
bool objectFromAgentManager (const DtUniqueID &id) const
 

Protected Member Functions

virtual bool onStart ()
 
virtual bool onStop ()
 
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 
virtual bool onTick ()
 
virtual void handleAttachToChanged (DtObserver *observer)
 
DtSimEntryfindSimEntry (DtUniqueID elementId)
 
void disableCurrentStateView ()
 
virtual void slot_stateViewUpdated (DtVrlinkEntityStateView *stateView)
 
virtual void slot_simObjectRemoved (DtSimObjectEntry &)
 
- Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 
void reportElementDestroyed (DtElementID id)
 
void start ()
 
void stop ()
 
bool tick ()
 
virtual void setInstanceName (const std::string &name)
 
virtual void installAccessories ()
 
virtual void uninstallAccessories ()
 

Protected Attributes

DtVrlinkEntityStateViewmyStateView
 
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

Constructor & Destructor Documentation

DtStateViewDriver::DtStateViewDriver ( DtAgentManager agentManager,
const std::string &  instanceName 
)

CTOR.

virtual DtStateViewDriver::~DtStateViewDriver ( )
virtual

DTOR.

Member Function Documentation

virtual const std::string& DtStateViewDriver::className ( ) const
virtual

Get the class name as a string.

Implements makVrv::DtDriver.

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

Implements makVrv::DtDriver.

virtual bool DtStateViewDriver::onStop ( )
protectedvirtual

Called when the driver is stopped by the display engine.

Implements makVrv::DtDriver.

virtual void DtStateViewDriver::slot_displayEngineAdded ( const DtDeRecord igRecord)
protectedvirtual

Called when a display engine is connected; restarts the driver.

Reimplemented from makVrv::DtDriver.

virtual bool DtStateViewDriver::onTick ( )
protectedvirtual

Stub implementation since this driver doesn't have anything that needs updating.

Implements makVrv::DtDriver.

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:

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)