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 | Protected Member Functions | Protected Attributes
makVrv::DtLegionConnection Class Reference

The base class for protocol specific VRLink Simulations.

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

Public Member Functions

 DtLegionConnection (DtAgentManagerInterface &aSceneInterface, const DtCoordinateSystem &coordSystem, const DtEntityAppearanceMapperFactoryCreator &appFactoryCreator, DtSharedSettingsManager &settingsManager, DtLegionDriver &driver)
 
virtual ~DtLegionConnection ()
 
virtual void setConnectionConfiguration (const Legion::Configuration &config)
 
virtual bool connect ()
 
virtual bool connected () const
 
virtual bool disconnect ()
 
virtual void tick (double dt)
 
virtual double simTime () const
 
virtual void setSimTime (double simTime)
 
virtual double clockTime () const
 
virtual DtTimeStampType timeStampType () const
 
virtual void setViewControlChanged (bool enabled)
 
virtual void setConnectionFrameTime (double frameTime)
 
virtual double connectionFrameTime () const
 
virtual void setUseTopoForFlatEarthVectorConversion (bool enabled)
 
virtual void observerUpdated (const std::string &observerName, double x, double y, double z, double psi, double theta, double phi)
 
virtual void observerUpdated (const std::string &observerName, double x, double y, double z, double psi, double theta, double phi, double dx, double dy, double dz, double dpsi, double dtheta, double dphi)
 
virtual void stopPublishingObserver (const std::string &observerName)
 
virtual void startPublishingObserver (const std::string &observerName)
 
void setSupportsDelayedVisualizerCreation (bool)
 
bool supportsDelayedVisualizerCreation () const
 
virtual void queueDriverFunction (boost::function< void()> func)
 
virtual void queueConnectionFunction (boost::function< void()> func)
 
Legion::SimulationDatabase * database ()
 
Legion::Connection * connection ()
 
Legion::ViewManager * viewManager ()
 
virtual DtLegionDriver & driver ()
 
virtual const DtLegionDriver & driver () const
 
virtual void setInterestSize (int size)
 
virtual int interestSize ()
 
virtual void setObserverForward (DtVector &localPos, DtVector &localFwd)
 
virtual Legion::Vector3d observerForward ()
 
virtual Legion::Vector3d observerLocation ()
 
virtual void resetConnection ()
 
virtual void setExternalCommunicationControl (bool)
 
- Public Member Functions inherited from makVrv::DtBaseConnection
 DtBaseConnection (DtSharedSettingsManager &settingsManager, DtAgentManagerInterface &aSceneInterface, const DtCoordinateSystem &coordSystem)
 
 DtBaseConnection (DtSharedSettingsManager &settingsManager, DtAgentManagerInterface &aSceneInterface)
 
virtual ~DtBaseConnection ()
 
virtual void clearInstances ()
 
virtual void coordinateSystemChanged (const std::string &coordinateName, const std::string &coordinateOrigin)
 
const DtCoordinateSystem & coordinateSystem () const
 
DtSharedSettingsManager & settingsManager ()
 
virtual DtAgentManagerInterface & sceneInterface ()
 
const DtSharedSettingsManager & settingsManager () const
 
DtVisualizerCreationSettings & visualizerCreationSettings ()
 
void reportElementCreated (DtElementID id, DtElementID parentId, unsigned int type)
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 
void reportElementDestroyed (DtElementID id)
 
const DtElementChanges & currentElementChanges () const
 
DtElementChanges * takeElementChanges ()
 
DtTemporaryAgentManager & temporaryEffects ()
 
DtBlinkingObjectManager & blinkManager ()
 
DtRandomNumberGenerator & randomNumberGenerator ()
 
virtual const std::string & tag ()
 
const DtUnicode & emptyString () const
 
virtual DtVirtualBaseClass * findInstance (const std::string &instanceName)
 
bool destroyingInstances () const
 
virtual void registerInstance (const std::string &instanceName, DtVirtualBaseClass *instance)
 

Public Attributes

boost::signals2::signal< void()> signal_exerciseConnectionCreated
 
boost::signals2::signal< void()> signal_preTick
 
boost::signals2::signal< void()> signal_postTick
 
boost::signals2::signal< void()> signal_postBeginFrame
 
boost::signals2::signal< void()> signal_preEndFrame
 
boost::signals2::signal< void()> signal_databaseCreated
 
- Public Attributes inherited from makVrv::DtBaseConnection
vrvSignalsLib::signal< void()> signal_coordinateSystemChanged
 
boost::signalslib::signal< void()> signal_preConnectionTick
 
boost::signalslib::signal< void()> signal_postConnectionTick
 

Protected Member Functions

void addObserverPublisher (const std::string &observerName)
 
void updateInterest ()
 

Protected Attributes

bool myViewControlsEnabled
 
bool myUseTopoForFlatEarthVectorConversion
 
DtSignalConnectionManager myConnections
 
double myConnectionFrameTime
 
bool mySupportsDelayedVisualizerCreation
 
DtLegionDriver & myDriver
 
DtEntityProcessor * myEntityProcessor
 
DtFireEventProcessor * myFireProcessor
 
DtDetonationEventProcessor * myDetonationProcessor
 
Legion::Configuration * myConnectionConfiguration
 
Legion::SimulationDatabase * myDatabase
 
Legion::Connection * myConnection
 
Legion::ViewManager * myViewManager
 
double mySimTime
 
float myInterestSize
 
Legion::Vector3f myObserverForward
 
Legion::Vector3d myObserverLocation
 
Legion::Vector3d myLastObserverLocation
 
Legion::BoundarySpatialSpherical * myBoundary
 
bool myExternalCommunicationControl
 
- Protected Attributes inherited from makVrv::DtBaseConnection
DtSharedSettingsManager & mySettingsManagerCache
 
DtRandomNumberGenerator myRandomNumberGenerator
 
DtAgentManagerInterface & mySceneInterface
 
DtElementChanges * myWorkingElementChanges
 
DtTemporaryAgentManager * myTemporaryEffects
 
DtBlinkingObjectManager * myBlinkManager
 
DtUnicode myEmptyString
 
InstanceMap myInstances
 
bool myDestroyingInstanceFlag
 
DtCoordinateSystem * myCoordinateSystem
 
DtVisualizerCreationSettings * myVisualizerCreationSettings
 

Additional Inherited Members

- Protected Types inherited from makVrv::DtBaseConnection
using InstanceMap = std::unordered_map< std::string, DtVirtualBaseClass * >
 

Constructor & Destructor Documentation

makVrv::DtLegionConnection::DtLegionConnection ( DtAgentManagerInterface &  aSceneInterface,
const DtCoordinateSystem &  coordSystem,
const DtEntityAppearanceMapperFactoryCreator &  appFactoryCreator,
DtSharedSettingsManager &  settingsManager,
DtLegionDriver &  driver 
)

CTOR.

virtual makVrv::DtLegionConnection::~DtLegionConnection ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtLegionConnection::setConnectionConfiguration ( const Legion::Configuration &  config)
virtual

Set the exercise connection parameters. This creates a clone of the config and does not take ownership of the passed in object.

virtual bool makVrv::DtLegionConnection::connect ( )
virtual

Function that creates the exercise conn and reflected lists.

Returns
if connect succeeds
Return values
truesuccess
falsefailure

Implements makVrv::DtVrlinkBaseConnection.

virtual bool makVrv::DtLegionConnection::connected ( ) const
virtual

Check to see if the simulation is connected. Base version always returns false.

Reimplemented from makVrv::DtVrlinkBaseConnection.

virtual bool makVrv::DtLegionConnection::disconnect ( )
virtual

Function that destroys the exercise conn and reflected lists.

Returns
if connect succeeds
Return values
truesuccess
falsefailure

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::tick ( double  dt)
virtual

Function to be called repeatedly by a thread.

Implements makVrv::DtVrlinkBaseConnection.

virtual double makVrv::DtLegionConnection::simTime ( ) const
virtual

Get the current simulation time from the connection's vrlink exercise connection.

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::setSimTime ( double  simTime)
virtual

Set the current simulation time to the connection's vrlink exercise connection.

Implements makVrv::DtVrlinkBaseConnection.

virtual double makVrv::DtLegionConnection::clockTime ( ) const
virtual

Get the current clock time (absRealTime()) from the connection's vrlink exercise connection.

Implements makVrv::DtVrlinkBaseConnection.

virtual DtTimeStampType makVrv::DtLegionConnection::timeStampType ( ) const
virtual

Get the timestamp type in use (Relative or Absolute) by the connection's vrlink exercise connection.

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::setViewControlChanged ( bool  enabled)
virtual

Set that the view controls have changed.

Implements makVrv::DtVrlinkBaseConnection.

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

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

Implements makVrv::DtVrlinkBaseConnection.

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

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

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::setUseTopoForFlatEarthVectorConversion ( bool  enabled)
virtual

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 sim using the old method (including older versions of VR-Forces and DI-Guy) user's may want to revert to the old scheme.

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::observerUpdated ( const std::string &  observerName,
double  x,
double  y,
double  z,
double  psi,
double  theta,
double  phi 
)
virtual

handle observer position and orientation changes

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::observerUpdated ( const std::string &  observerName,
double  x,
double  y,
double  z,
double  psi,
double  theta,
double  phi,
double  dx,
double  dy,
double  dz,
double  dpsi,
double  dtheta,
double  dphi 
)
virtual

handle observer position and orientation changes including rotational and linear velocities

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::stopPublishingObserver ( const std::string &  observerName)
virtual

Start publishing an observer.

Implements makVrv::DtVrlinkBaseConnection.

virtual void makVrv::DtLegionConnection::startPublishingObserver ( const std::string &  observerName)
virtual

Stop publishing an observer.

Implements makVrv::DtVrlinkBaseConnection.

void makVrv::DtLegionConnection::setSupportsDelayedVisualizerCreation ( bool  )

Sets whether or not delayed visualizer (during post tick signal) is supported. Default is true.

bool makVrv::DtLegionConnection::supportsDelayedVisualizerCreation ( ) const
virtual void makVrv::DtLegionConnection::queueDriverFunction ( boost::function< void()>  func)
virtual

Queues a function to be run from the driver (main, render) thread.

virtual void makVrv::DtLegionConnection::queueConnectionFunction ( boost::function< void()>  func)
virtual

Queues a function to be run from the connection thread. May be used to respond to queries made in functions run from the driver function queue.

Legion::SimulationDatabase* makVrv::DtLegionConnection::database ( )
Legion::Connection* makVrv::DtLegionConnection::connection ( )
Legion::ViewManager* makVrv::DtLegionConnection::viewManager ( )
virtual DtLegionDriver& makVrv::DtLegionConnection::driver ( )
virtual

Access the vrlink driver. Typically, this can only be used if useThreadFlag is false.

virtual const DtLegionDriver& makVrv::DtLegionConnection::driver ( ) const
virtual
virtual void makVrv::DtLegionConnection::setInterestSize ( int  size)
virtual
virtual int makVrv::DtLegionConnection::interestSize ( )
virtual
virtual void makVrv::DtLegionConnection::setObserverForward ( DtVector &  localPos,
DtVector &  localFwd 
)
virtual
virtual Legion::Vector3d makVrv::DtLegionConnection::observerForward ( )
virtual
virtual Legion::Vector3d makVrv::DtLegionConnection::observerLocation ( )
virtual
virtual void makVrv::DtLegionConnection::resetConnection ( )
virtual
virtual void makVrv::DtLegionConnection::setExternalCommunicationControl ( bool  )
virtual
void makVrv::DtLegionConnection::addObserverPublisher ( const std::string &  observerName)
protected

Create a new observer publisher if one doesn't exist yet.

void makVrv::DtLegionConnection::updateInterest ( )
protected

Member Data Documentation

boost::signals2::signal<void()> makVrv::DtLegionConnection::signal_exerciseConnectionCreated

Signal sent when the exercise connection is created, but before some initialization (like creating reflected entity lists) happens. Typically users will want to use the base connection's signal_created; but this is here in case someone needs access to the connection before its initialization is completed.

boost::signals2::signal<void()> makVrv::DtLegionConnection::signal_preTick

Signal sent before the tick starts.

boost::signals2::signal<void()> makVrv::DtLegionConnection::signal_postTick

Signal sent after the tick has been completed.

boost::signals2::signal<void()> makVrv::DtLegionConnection::signal_postBeginFrame

Sent right after begin frame.

boost::signals2::signal<void()> makVrv::DtLegionConnection::signal_preEndFrame

Sent right before end frame.

boost::signals2::signal<void()> makVrv::DtLegionConnection::signal_databaseCreated

Sent right after the database is created.

bool makVrv::DtLegionConnection::myViewControlsEnabled
protected

typedef boost::unordered_map<std::string,DtEntityAppearanceMapper*> AppearanceMapperMap; typedef boost::unordered_map<std::string, Legion::WriteEntityRepository> ObserverPublisherMap;

ObserverPublisherMap myObserverPublishers;

bool makVrv::DtLegionConnection::myUseTopoForFlatEarthVectorConversion
protected
DtSignalConnectionManager makVrv::DtLegionConnection::myConnections
protected
double makVrv::DtLegionConnection::myConnectionFrameTime
protected
bool makVrv::DtLegionConnection::mySupportsDelayedVisualizerCreation
protected
DtLegionDriver& makVrv::DtLegionConnection::myDriver
protected
DtEntityProcessor* makVrv::DtLegionConnection::myEntityProcessor
protected
DtFireEventProcessor* makVrv::DtLegionConnection::myFireProcessor
protected
DtDetonationEventProcessor* makVrv::DtLegionConnection::myDetonationProcessor
protected
Legion::Configuration* makVrv::DtLegionConnection::myConnectionConfiguration
protected
Legion::SimulationDatabase* makVrv::DtLegionConnection::myDatabase
protected
Legion::Connection* makVrv::DtLegionConnection::myConnection
protected
Legion::ViewManager* makVrv::DtLegionConnection::myViewManager
protected
double makVrv::DtLegionConnection::mySimTime
protected
float makVrv::DtLegionConnection::myInterestSize
protected
Legion::Vector3f makVrv::DtLegionConnection::myObserverForward
protected
Legion::Vector3d makVrv::DtLegionConnection::myObserverLocation
protected
Legion::Vector3d makVrv::DtLegionConnection::myLastObserverLocation
protected
Legion::BoundarySpatialSpherical* makVrv::DtLegionConnection::myBoundary
protected
bool makVrv::DtLegionConnection::myExternalCommunicationControl
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)