VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtVrlinkDriver Class Referenceabstract

The base class for VR-Link based drivers.

Inheritance diagram for makVrv::DtVrlinkDriver:
Inheritance graph
[legend]

Public Member Functions

 DtVrlinkDriver (DtAgentManager &agentManager, const std::string &uniqueName, const std::string &className)
 
virtual ~DtVrlinkDriver ()
 
virtual const std::string & className () const
 
virtual bool observersPublished () const
 
virtual void setObserversPublished (bool isPublished)
 
virtual bool overrideGlobalViewControl () const
 
virtual void setOverrideGlobalViewControl (bool enabled)
 
virtual bool viewControlEnabled () const
 
virtual void setLocalViewControlEnabled (bool enabled)
 
virtual bool localViewControlEnabled () const
 
virtual void setConnectionFrameTime (double frameTime)
 
virtual double connectionFrameTime () const
 
void setUseTopoForFlatEarthVectorConversion (bool flag)
 
bool useTopoForFlatEarthVectorConversion () const
 
virtual void queueDriverFunction (const std::function< void()> &function)
 
virtual void queueConnectionFunction (const std::function< void()> &function)
 
bool useThreadFlag () const
 
DtVrlinkBaseConnectionconnection ()
 
- 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 (bool saveAllParameters=false) 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
 

Public Attributes

boost::signalslib::signal
< void(DtVrlinkBaseConnection *)> 
signal_connectionCreated
 
boost::signalslib::signal
< void(DtVrlinkBaseConnection *)> 
signal_connectionAboutToBeDestroyed
 

Static Public Attributes

static const std::string theExConnConfigFileCount
 
static const std::string theExConnConfigFile
 

Protected Types

enum  FunctionType { Create, Update, Destroy }
 
typedef DtLockedBufferedQueue
< std::function< void()> > 
FunctionCallQueue
 
typedef std::vector
< std::function< void()> > 
FunctionCallList
 

Protected Member Functions

virtual DtVrlinkBaseConnectioncreateConnection ()=0
 
virtual bool onStart ()
 
virtual bool onStop ()
 
virtual void run ()
 
void startPublishingObservers ()
 
void stopPublishingObservers ()
 
virtual bool onTick ()
 
void startThread ()
 
void stopThread ()
 
void setConnectionState (bool state)
 
virtual void slot_displayEngineAdded (const DtDeRecord &igRecord)
 
virtual void slot_globalViewControlEnabledSet (bool)
 
virtual void slot_onObserverDestroyed (DtObserver *observer)
 
virtual void slot_onObserverCreated (DtObserver *observer)
 
virtual void startPublishingObserver (DtObserver *observer)
 
virtual void stopPublishingObserver (DtObserver *observer)
 
virtual void updateObservers ()
 
virtual void slot_pause ()
 
virtual void slot_resume ()
 
virtual void runFunctionQueue (FunctionCallQueue &queue)
 
virtual void connectToDynamicSignals ()
 
virtual void disconnectFromDynamicSignals ()
 
virtual void slot_onViewChanged (DtViewStateProcessor::ObserverAction &action)
 
virtual void slot_onCurrentSelectionChanged (const DtSelectionManager::IdSet &selected, const DtSelectionManager::IdSet &deselected)
 
virtual void slot_onElementHasHoveredWidget (const DtElementID &elementId, bool hasMouseCursor)
 
virtual void slot_onVertexElementHasHoveredWidget (const DtElementID &parentId, const DtElementID &vertexElementId, bool hasMouseCursor)
 
virtual void slot_onVertexSelected (const DtUniqueID &selected, const DtUniqueID &parentOfSelected)
 
virtual void slot_onVertexDeselected (const DtUniqueID &deselected, const DtUniqueID &parentOfDeselected)
 
virtual void slot_infoLabelsArePinned (const DtSelectionManager::IdSet &elementIds, bool arePinned)
 
virtual void slot_entityTrackHistoryColorOverride (const DtElementID &entityId, const DtColorValue &color, bool overrideColor)
 
virtual void slot_switchEntitySymbolDecorationQuadrant (const DtElementID &entityId)
 
virtual void slot_onCoordinateSystemChanged (const std::string &coordinateSystem, const std::string &coordinateParameters)
 
virtual void toggleEntitySelected (const DtUniqueID &id)
 
virtual void performObserverAction (const DtViewStateProcessor::ObserverAction &action)
 
- 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

std::string myClassName
 
DtVrlinkBaseConnectionmyConnection
 
DtAsynchronousEventQueuemyAsynchronousEventQueue
 
bool myConnectionState
 
DtSignalConnectionManager myDynamicSignals
 
double myObserverUpdateTimeInterval
 
double myLastObserverUpdateTime
 
double myLastSimTime
 
bool myObserversPublished
 
bool myLocalViewControlEnabled
 
bool myGlobalViewControlEnabled
 
bool myOverrideGlobalViewControlEnabled
 
bool myUseTopoForFlatEarthVectorConversion
 
double myConnectionFrameTime
 
DtSelectionManagermySelectionManager
 
std::string myAppName
 
std::string myAppVersion
 
std::string myDefaultConfigFile
 
std::vector< std::string > myConfigFiles
 
bool myUseThreadFlag
 
DtThreadStartSP myStart
 
DtThread * myThread
 
FunctionCallQueue myConnectionThreadFunctions
 
FunctionCallQueue myDriverThreadFunctions
 
DtAsynchronousAgentManagermyAsynchronousInterface
 
- Protected Attributes inherited from makVrv::DtDriver
DtAgentManagermyAgentManager
 
bool myStartedFlag
 
std::string myName
 
DtConfiguration myConfiguration
 
bool myPersistentFlag
 
bool myUserControllableFlag
 
bool myRequestStateDiffPendingFlag
 
DtElementChanges myChanges
 

Additional Inherited Members

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

Member Typedef Documentation

typedef DtLockedBufferedQueue<std::function<void ()> > makVrv::DtVrlinkDriver::FunctionCallQueue
protected
typedef std::vector<std::function<void ()> > makVrv::DtVrlinkDriver::FunctionCallList
protected

Member Enumeration Documentation

Enumerator
Create 
Update 
Destroy 

Constructor & Destructor Documentation

makVrv::DtVrlinkDriver::DtVrlinkDriver ( DtAgentManager agentManager,
const std::string &  uniqueName,
const std::string &  className 
)

CTOR.

virtual makVrv::DtVrlinkDriver::~DtVrlinkDriver ( )
virtual

DTOR.

Member Function Documentation

virtual const std::string& makVrv::DtVrlinkDriver::className ( ) const
virtual

Get this instance's class name.

Implements makVrv::DtDriver.

virtual bool makVrv::DtVrlinkDriver::observersPublished ( ) const
virtual

Get observer publishing status for this driver.

virtual void makVrv::DtVrlinkDriver::setObserversPublished ( bool  isPublished)
virtual

Turn on or off observer publishing for this driver.

virtual bool makVrv::DtVrlinkDriver::overrideGlobalViewControl ( ) const
virtual

Get whether this driver uses its own local view control enabled flag or the global value.

virtual void makVrv::DtVrlinkDriver::setOverrideGlobalViewControl ( bool  enabled)
virtual

SGet whether this driver uses its own local view control enabled flag or the global value.

virtual bool makVrv::DtVrlinkDriver::viewControlEnabled ( ) const
virtual

Get view control status for this driver; returns either the local or the global setting, depending on the value of overrideGlobalViewControl.

virtual void makVrv::DtVrlinkDriver::setLocalViewControlEnabled ( bool  enabled)
virtual

Turn on or off acceptance of view controls for this driver; used if override global view control is true.

virtual bool makVrv::DtVrlinkDriver::localViewControlEnabled ( ) const
virtual

Get acceptance of view controls for this driver; used if override global view control is true.

virtual void makVrv::DtVrlinkDriver::setConnectionFrameTime ( double  frameTime)
virtual

Set the connection frame time. This is 1/frequency for the connection tick. Default is 1/60.

virtual double makVrv::DtVrlinkDriver::connectionFrameTime ( ) const
virtual

Get the connection frame time. This is 1/frequency for the connection tick. Default is 1/60.

void makVrv::DtVrlinkDriver::setUseTopoForFlatEarthVectorConversion ( bool  flag)

We used to use a topo system to convert flat earth vectors. Now we find the point at the end of the vector, convert start and end points, and subtract for a more accurate result. However, when receiving data from a connection using the old method (including older versions of VR-Forces and DI-Guy) user's may want to revert to the old scheme.

bool makVrv::DtVrlinkDriver::useTopoForFlatEarthVectorConversion ( ) const
virtual void makVrv::DtVrlinkDriver::queueDriverFunction ( const std::function< void()> &  function)
virtual

Put a function in the driver-thread function queue, for threadsafe calling.

virtual void makVrv::DtVrlinkDriver::queueConnectionFunction ( const std::function< void()> &  function)
virtual

Put a function in the connection-thread function queue, for threadsafe calling.

Referenced by DtExConnInterface::sendCommentInteraction().

bool makVrv::DtVrlinkDriver::useThreadFlag ( ) const
inline

Returns value of thread flag.

DtVrlinkBaseConnection* makVrv::DtVrlinkDriver::connection ( )
inline
virtual DtVrlinkBaseConnection* makVrv::DtVrlinkDriver::createConnection ( )
protectedpure virtual
virtual bool makVrv::DtVrlinkDriver::onStart ( )
protectedvirtual

Start the host output. Create all object for an existing host connection.

Implements makVrv::DtDriver.

Reimplemented in makVrf::vrfLegion::DtVrfLegionDriver, and makVrv::DtLegionDriver.

virtual bool makVrv::DtVrlinkDriver::onStop ( )
protectedvirtual

Stop the host output. All scene object created by the host should be destroyed.

Implements makVrv::DtDriver.

Reimplemented in makVrv::DtLegionDriver.

virtual void makVrv::DtVrlinkDriver::run ( )
protectedvirtual

Function that will be called when the thread is started.

void makVrv::DtVrlinkDriver::startPublishingObservers ( )
protected

Start publishing observers.

void makVrv::DtVrlinkDriver::stopPublishingObservers ( )
protected

Stop publishing observers.

virtual bool makVrv::DtVrlinkDriver::onTick ( )
protectedvirtual

Tick, this calls threadTick if the driver is not configured to use a separate thread.

Implements makVrv::DtDriver.

Reimplemented in makVrf::vrfLegion::DtVrfLegionDriver, and makVrv::DtLegionDriver.

void makVrv::DtVrlinkDriver::startThread ( )
protected

Attempt to start the thread.

Exceptions
DtCorruptedStateif the thread does not start.
void makVrv::DtVrlinkDriver::stopThread ( )
protected

Attempt to stop the thread, blocking until the thread stops.

void makVrv::DtVrlinkDriver::setConnectionState ( bool  state)
protected

Set the connection state of the driver.

virtual void makVrv::DtVrlinkDriver::slot_displayEngineAdded ( const DtDeRecord igRecord)
protectedvirtual

Respond when a display engine is added.

Reimplemented from makVrv::DtDriver.

virtual void makVrv::DtVrlinkDriver::slot_globalViewControlEnabledSet ( bool  )
protectedvirtual

Respond when the global view control setting changes.

virtual void makVrv::DtVrlinkDriver::connectToDynamicSignals ( )
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::disconnectFromDynamicSignals ( )
protectedvirtual

Disconnect to any signals connected to in connectToDynamicSignals()

virtual void makVrv::DtVrlinkDriver::slot_onViewChanged ( DtViewStateProcessor::ObserverAction action)
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::slot_onCurrentSelectionChanged ( const DtSelectionManager::IdSet selected,
const DtSelectionManager::IdSet deselected 
)
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::slot_onElementHasHoveredWidget ( const DtElementID elementId,
bool  hasMouseCursor 
)
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::slot_onVertexElementHasHoveredWidget ( const DtElementID parentId,
const DtElementID vertexElementId,
bool  hasMouseCursor 
)
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::slot_onVertexSelected ( const DtUniqueID selected,
const DtUniqueID parentOfSelected 
)
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::slot_onVertexDeselected ( const DtUniqueID deselected,
const DtUniqueID parentOfDeselected 
)
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::slot_infoLabelsArePinned ( const DtSelectionManager::IdSet elementIds,
bool  arePinned 
)
protectedvirtual

Slot that updates the pinned state of informative labels for all elements whose element id is present in the provided list. This slot is connected to: DtSelectionManager::signal_infoLabelsArePinned This driver notifies network-side state listeners via the following signal: DtSharedEntityDisplaySettingsSignaler::signal_infoLabelsArePinned.

See Also
DtSelectionManager
DtSharedEntityDisplaySettingsSignaler
virtual void makVrv::DtVrlinkDriver::slot_entityTrackHistoryColorOverride ( const DtElementID entityId,
const DtColorValue color,
bool  overrideColor 
)
protectedvirtual

slot for handling the selecion manager event when a track history is set to change color

virtual void makVrv::DtVrlinkDriver::slot_switchEntitySymbolDecorationQuadrant ( const DtElementID entityId)
protectedvirtual

slot for handling the switching of which quadrant symbol decorations are rendered in (for the specified entity)

virtual void makVrv::DtVrlinkDriver::slot_onCoordinateSystemChanged ( const std::string &  coordinateSystem,
const std::string &  coordinateParameters 
)
protectedvirtual

Slot for handling coordinate system changes.

virtual void makVrv::DtVrlinkDriver::toggleEntitySelected ( const DtUniqueID id)
protectedvirtual

Toggle selection of an entity.

virtual void makVrv::DtVrlinkDriver::performObserverAction ( const DtViewStateProcessor::ObserverAction action)
protectedvirtual

Connect to signals.

virtual void makVrv::DtVrlinkDriver::slot_onObserverDestroyed ( DtObserver observer)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::slot_onObserverCreated ( DtObserver observer)
protectedvirtual
virtual void makVrv::DtVrlinkDriver::startPublishingObserver ( DtObserver observer)
protectedvirtual

Start publishing an observer on the current connection.

virtual void makVrv::DtVrlinkDriver::stopPublishingObserver ( DtObserver observer)
protectedvirtual

Stop publishing an observer on the current connection.

virtual void makVrv::DtVrlinkDriver::updateObservers ( )
protectedvirtual

Update the observer position/orientations on the connection.

Reimplemented in makVrv::DtLegionDriver.

virtual void makVrv::DtVrlinkDriver::slot_pause ( )
protectedvirtual

Slot called when the DtDe's pause signal is emitted. If a connection exists, this will be communicated to it.

virtual void makVrv::DtVrlinkDriver::slot_resume ( )
protectedvirtual

Slot called when the DtDe's resume signal is emitted/ If a connection exists, this will be communicated to it.

virtual void makVrv::DtVrlinkDriver::runFunctionQueue ( FunctionCallQueue queue)
protectedvirtual

Execute a function queue.

Member Data Documentation

const std::string makVrv::DtVrlinkDriver::theExConnConfigFileCount
static
const std::string makVrv::DtVrlinkDriver::theExConnConfigFile
static
boost::signalslib::signal<void (DtVrlinkBaseConnection*)> makVrv::DtVrlinkDriver::signal_connectionCreated

This signal is emitted when the connection is created.

boost::signalslib::signal<void (DtVrlinkBaseConnection*)> makVrv::DtVrlinkDriver::signal_connectionAboutToBeDestroyed

This signal is emitted when the connection is about to be destroyed.

std::string makVrv::DtVrlinkDriver::myClassName
protected
bool makVrv::DtVrlinkDriver::myUseThreadFlag
protected
DtThreadStartSP makVrv::DtVrlinkDriver::myStart
protected
DtThread* makVrv::DtVrlinkDriver::myThread
protected
FunctionCallQueue makVrv::DtVrlinkDriver::myConnectionThreadFunctions
protected
FunctionCallQueue makVrv::DtVrlinkDriver::myDriverThreadFunctions
protected
DtAsynchronousAgentManager* makVrv::DtVrlinkDriver::myAsynchronousInterface
protected
DtVrlinkBaseConnection* makVrv::DtVrlinkDriver::myConnection
protected
DtAsynchronousEventQueue* makVrv::DtVrlinkDriver::myAsynchronousEventQueue
protected
bool makVrv::DtVrlinkDriver::myConnectionState
protected
DtSignalConnectionManager makVrv::DtVrlinkDriver::myDynamicSignals
protected
double makVrv::DtVrlinkDriver::myObserverUpdateTimeInterval
protected
double makVrv::DtVrlinkDriver::myLastObserverUpdateTime
protected
double makVrv::DtVrlinkDriver::myLastSimTime
protected
bool makVrv::DtVrlinkDriver::myObserversPublished
protected
bool makVrv::DtVrlinkDriver::myLocalViewControlEnabled
protected
bool makVrv::DtVrlinkDriver::myGlobalViewControlEnabled
protected
bool makVrv::DtVrlinkDriver::myOverrideGlobalViewControlEnabled
protected
bool makVrv::DtVrlinkDriver::myUseTopoForFlatEarthVectorConversion
protected
double makVrv::DtVrlinkDriver::myConnectionFrameTime
protected
DtSelectionManager& makVrv::DtVrlinkDriver::mySelectionManager
protected
std::string makVrv::DtVrlinkDriver::myAppName
protected
std::string makVrv::DtVrlinkDriver::myAppVersion
protected
std::string makVrv::DtVrlinkDriver::myDefaultConfigFile
protected
std::vector<std::string> makVrv::DtVrlinkDriver::myConfigFiles
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)