VR-Vantage
Loading...
Searching...
No Matches
DtDistributedDrawDriver Class Reference
Inheritance diagram for DtDistributedDrawDriver:

Public Member Functions

 DtDistributedDrawDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtDistributedDrawDriver ()
 Virtual DTOR.
virtual const std::string & className () const
 Get the class name as a string.
virtual void drawRandomSphere ()
Public Member Functions inherited from makVrv::DtDriver
 DtDriver (DtAgentManager &agentManager, const std::string &instanceName)
 CTOR.
virtual ~DtDriver ()
 DTOR.
virtual void realizeConfiguration (const DtConfiguration &configuration)
 Realize the driver using the configuration.
virtual DtConfiguration createConfiguration (bool saveAllParameters=false) const
 Create a configuration for the driver.
DtAgentManager & agentManager ()
 Get the master scene for this host. Do not create drivers using this agentManager, use the sceneInterface as it may replaced the implementation of the sceneInterface.
virtual DtAgentManagerInterface & sceneInterface ()
 Get the scene manager interface for creating agents.
bool started () const
 Get this driver's active state.
virtual const std::string & instanceName () const
 Get this driver's instance name.
virtual bool autoStart () const
 Get whether this driver is set to automatically start if it is persistent.
virtual void setAutoStart (bool autoStart)
 Set whether this driver automatically starts if it is persistent.
virtual bool isWindowDependent () const
 Get whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsWindowDependent (bool dep)
 Set whether this driver is set to automatically start when the first window is created and stop when the last window is destroyed.
virtual void setIsUserControllable (bool)
 Set whether this driver can be started and stopped by the user.
virtual bool isUserControllable () const
 Get whether this driver can be started and stopped by the user.
virtual void setIsPersistent (bool per)
 Set if the driver is persistent and should be saved between runs.
virtual bool isPersistent () const
 Get if the driver is persistent and should be saved between runs.
virtual bool isOnDriverSelectionList () const
 Returns whether or not this driver is to be automatically started/stopped from the driver selection list.
virtual void setOnDriverSelectionList (bool)
 Sets whether or not this item is on the driver selection list. Will be saved to record if state is different.
bool objectFromAgentManager (const DtUniqueID &id) const
 check to see if the object was created using this driver's agent manager.

Protected Member Functions

virtual bool onStart ()
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 updateSphere ()
 Utility function add a sphere at location x,y,z in the scene.
Protected Member Functions inherited from makVrv::DtDriver
void applyChangesAndDelete (DtElementChanges *changes)
 Function for apply changes from a changes object and deleting it. This function is useful for queuing from an external thread as a means of passing changes from a secondary thread back to the main thread.
void reportElementCreated (DtElementID id, DtElementID parentId, DtElementEntry::ElementType type)
 Report an element created.
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 Report an element attribute changed.
void reportElementDestroyed (DtElementID id)
 Report an element destroyed.
void start ()
 Start the driver. Called by the Master Scene. Calls installAccessories().
void stop ()
 Stop the driver. Called by the Master Scene. Calls uninstallAccessories().
bool tick ()
 Tick the host driver. Called by the Master Scene.
virtual void setInstanceName (const std::string &name)
 set the Instance name.
virtual void installAccessories ()
 Installs accessories on this driver. The compatible and enabled accessories in the DtDriverManager's accessory map are installed on this driver.
virtual void uninstallAccessories ()
 Removes accessories from this driver. The compatible and enabled accessories in the DtDriverManager's accessory map are removed from this driver.

Protected Attributes

DtExampleDrawObjectAgent * myDrawAgent
 The draw agent that draws the sphere.
double mySphereX
 Saved location of the sphere.
double mySphereY
double mySphereZ
bool mySphereInScene
 Whether or not a sphere is displayed.
Protected Attributes inherited from makVrv::DtDriver
DtAgentManager & myAgentManager
bool myStartedFlag
std::string myName
DtConfiguration myConfiguration
bool myPersistentFlag
bool myUserControllableFlag
bool myRequestStateDiffPendingFlag
DtElementChanges myChanges
DtSignalConnectionManager myConnections
 Auto-disconnects on destruction; avoids singleton lookups in the DTOR.

Additional Inherited Members

Static Protected Attributes inherited from makVrv::DtDriver
static const std::string theOnDriverSelectionList

Constructor & Destructor Documentation

◆ DtDistributedDrawDriver()

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

◆ ~DtDistributedDrawDriver()

virtual DtDistributedDrawDriver::~DtDistributedDrawDriver ( )
virtual

Virtual DTOR.

Member Function Documentation

◆ className()

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

Get the class name as a string.

Implements makVrv::DtDriver.

◆ drawRandomSphere()

virtual void DtDistributedDrawDriver::drawRandomSphere ( )
virtual

Randomly place a sphere in the scene or move the sphere to a new random location if it's already been added.

◆ onStart()

virtual bool DtDistributedDrawDriver::onStart ( )
protectedvirtual

When late-joining display engines are connected to the master display engine, all drivers are stopped and restarted. The onStop() and onStart() implementations for this driver will save the sphere's state when the driver is stopped, and recreate it when the driver is started. 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.

◆ onStop()

virtual bool DtDistributedDrawDriver::onStop ( )
protectedvirtual

Called when the driver is stopped by the display engine.

Implements makVrv::DtDriver.

◆ slot_displayEngineAdded()

virtual void DtDistributedDrawDriver::slot_displayEngineAdded ( const DtDeRecord & igRecord)
protectedvirtual

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

Reimplemented from makVrv::DtDriver.

◆ onTick()

virtual bool DtDistributedDrawDriver::onTick ( )
protectedvirtual

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

Implements makVrv::DtDriver.

◆ updateSphere()

virtual void DtDistributedDrawDriver::updateSphere ( )
protectedvirtual

Utility function add a sphere at location x,y,z in the scene.

Member Data Documentation

◆ myDrawAgent

DtExampleDrawObjectAgent* DtDistributedDrawDriver::myDrawAgent
protected

The draw agent that draws the sphere.

◆ mySphereX

double DtDistributedDrawDriver::mySphereX
protected

Saved location of the sphere.

◆ mySphereY

double DtDistributedDrawDriver::mySphereY
protected

◆ mySphereZ

double DtDistributedDrawDriver::mySphereZ
protected

◆ mySphereInScene

bool DtDistributedDrawDriver::mySphereInScene
protected

Whether or not a sphere is displayed.


The documentation for this class was generated from the following file: