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 | Public Attributes | Protected Member Functions | Protected Attributes
makVrv::DtConnection Class Referenceabstract

The base class for protocol specific VRLink Simulations.

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

Public Member Functions

 DtConnection (DtAgentManagerInterface &aSceneInterface, const DtCoordinateSystem &coordSystem, const DtEntityAppearanceMapperFactoryCreator &appFactoryCreator, DtSharedSettingsManager &settingsManager)
 
virtual ~DtConnection ()
 
 DtConnection ()=delete
 
 DtConnection (const DtConnection &)=delete
 
DtConnectionoperator= (const DtConnection &)=delete
 
const DtEntityAppearanceMapperfindAppearanceMapper (const DtEntityType &type)
 
const
DtEntityAppearanceMapperFactory
appearanceMapperFactory () const
 
virtual void setWorldMagneticModel (DtWorldMagneticModel *magModel)
 
virtual DtWorldMagneticModel *const worldMagneticModel () const
 
virtual DtWorldMagneticModelworldMagneticModel ()
 
virtual const
DtDisplayUnitsConverter
displayUnitsConverter () const
 
virtual void createDisplayUnitsConverter ()
 
virtual bool connect ()=0
 
virtual bool connected () const
 
virtual bool disconnect ()=0
 
virtual void tick (double dt)=0
 
virtual double simTime () const =0
 
virtual void setSimTime (double simTime)=0
 
virtual double clockTime () const =0
 
virtual DtTimeStampType timeStampType () const =0
 
virtual void pauseConnection ()
 
virtual void resumeConnection ()
 
virtual bool connectionIsPaused () const
 
virtual void setViewControlChanged (bool enabled)=0
 
virtual void setConnectionFrameTime (double frameTime)=0
 
virtual double connectionFrameTime () const =0
 
virtual void setUseTopoForFlatEarthVectorConversion (bool enabled)=0
 
virtual void observerUpdated (const std::string &observerName, double x, double y, double z, double psi, double theta, double phi)=0
 
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)=0
 
virtual void stopPublishingObserver (const std::string &observerName)=0
 
virtual void startPublishingObserver (const std::string &observerName)=0
 
void tacticalGraphicIndicatorMouseDown (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
 
void tacticalGraphicIndicatorMouseUp (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
 
void tacticalGraphicIndicatorMouseDblClick (DtMouseState &mouseState, const DtUniqueID &id, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
 
void setAppNumber (int appNumber)
 
void setSiteId (int siteId)
 
virtual bool isDisconnecting () const
 
- 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 DtCoordinateSystemcoordinateSystem () const
 
DtSharedSettingsManagersettingsManager ()
 
virtual DtAgentManagerInterfacesceneInterface ()
 
const DtSharedSettingsManagersettingsManager () const
 
DtVisualizerCreationSettingsvisualizerCreationSettings ()
 
void reportElementCreated (DtElementID id, DtElementID parentId, unsigned int type)
 
void reportElementAttribute (DtElementID id, DtElementAttribute *attribute)
 
void reportElementDestroyed (DtElementID id)
 
const DtElementChangescurrentElementChanges () const
 
DtElementChangestakeElementChanges ()
 
DtTemporaryAgentManagertemporaryEffects ()
 
DtBlinkingObjectManagerblinkManager ()
 
DtRandomNumberGeneratorrandomNumberGenerator ()
 
virtual const std::string & tag ()
 
const DtUnicodeemptyString () const
 
virtual DtVirtualBaseClassfindInstance (const std::string &instanceName)
 
bool destroyingInstances () const
 
virtual void registerInstance (const std::string &instanceName, DtVirtualBaseClass *instance)
 

Public Attributes

boost::signalslib::signal
< void(DtMouseState &, const
DtUniqueID &, const
std::string &displayEngineName,
const std::string &windowName,
const std::string &channelName)> 
signal_tacticalGraphicIndicatorMouseDown
 
boost::signalslib::signal
< void(DtMouseState &, const
DtUniqueID &, const
std::string &displayEngineName,
const std::string &windowName,
const std::string &channelName)> 
signal_tacticalGraphicIndicatorMouseUp
 
boost::signalslib::signal
< void(DtMouseState &, const
DtUniqueID &, const
std::string &displayEngineName,
const std::string &windowName,
const std::string &channelName)> 
signal_tacticalGraphicIndicatorMouseDblClick
 
boost::signalslib::signal
< void(DtViewStateProcessor::ObserverAction &)> 
signal_viewChanged
 
boost::signalslib::signal< void()> signal_connected
 
boost::signalslib::signal< void()> signal_toBeDisconnected
 
- Public Attributes inherited from makVrv::DtBaseConnection
boost::signalslib::signal< void()> signal_coordinateSystemChanged
 

Protected Member Functions

virtual void slot_dateChanged (int year, DtDeTimeManager::Month month, int day)
 

Protected Attributes

DtEntityAppearanceMapperFactorymyMapperFactory
 
DtWorldMagneticModelmyWorldMagneticModel
 
DtDisplayUnitsConvertermyCoordinateConverter
 
boost::signalslib::connection myDateTimeSignalConnection
 
int myAppNumber
 
int mySiteId
 
bool myIsPausedFlag
 
bool myIsDisconnecting
 
- Protected Attributes inherited from makVrv::DtBaseConnection
DtSharedSettingsManagermySettingsManagerCache
 
DtRandomNumberGenerator myRandomNumberGenerator
 
DtAgentManagerInterfacemySceneInterface
 
DtElementChangesmyWorkingElementChanges
 
DtTemporaryAgentManagermyTemporaryEffects
 
DtBlinkingObjectManagermyBlinkManager
 
DtUnicode myEmptyString
 
InstanceMap myInstances
 
bool myDestroyingInstanceFlag
 
DtCoordinateSystemmyCoordinateSystem
 
DtVisualizerCreationSettingsmyVisualizerCreationSettings
 

Additional Inherited Members

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

Constructor & Destructor Documentation

makVrv::DtConnection::DtConnection ( DtAgentManagerInterface aSceneInterface,
const DtCoordinateSystem coordSystem,
const DtEntityAppearanceMapperFactoryCreator appFactoryCreator,
DtSharedSettingsManager settingsManager 
)

CTOR.

virtual makVrv::DtConnection::~DtConnection ( )
virtual

DTOR.

makVrv::DtConnection::DtConnection ( )
delete

not allowed - default constructor

makVrv::DtConnection::DtConnection ( const DtConnection )
delete

not allowed - copy constructor

Member Function Documentation

DtConnection& makVrv::DtConnection::operator= ( const DtConnection )
delete

not allowed - equals operator

const DtEntityAppearanceMapper* makVrv::DtConnection::findAppearanceMapper ( const DtEntityType &  type)

Attempt to get an appearance mapper from an entity type.

const DtEntityAppearanceMapperFactory& makVrv::DtConnection::appearanceMapperFactory ( ) const
virtual void makVrv::DtConnection::setWorldMagneticModel ( DtWorldMagneticModel magModel)
virtual

When the VR-Link driver creates this connection it provides a clone of it's DtWorldMagneticModel, which is then taken over by the connection (the connection will delete it in it's destructor. We do it this way (instead of creating our own magnetic model because the cloned model from the DtDe will be current as far as any date changes, and the connection does not have direct access to the DtDeTimeManager for initialization.

virtual DtWorldMagneticModel* const makVrv::DtConnection::worldMagneticModel ( ) const
virtual

Get this connection's DtWorldMagneticModel instance. Note that this may return null if the world magnetic model has not been set.

virtual DtWorldMagneticModel* makVrv::DtConnection::worldMagneticModel ( )
virtual
virtual const DtDisplayUnitsConverter& makVrv::DtConnection::displayUnitsConverter ( ) const
virtual

get the display units converter for this connection

virtual void makVrv::DtConnection::createDisplayUnitsConverter ( )
virtual

Create a DtDisplayUnitsConverter, using the connection's DtWorldMagneticModel copy.

virtual bool makVrv::DtConnection::connect ( )
pure virtual

Function that creates the exercise conn and reflected lists.

Returns
if connect succeeds
Return values
truesuccess
falsefailure

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

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

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

Reimplemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual bool makVrv::DtConnection::disconnect ( )
pure virtual

Function that destroys the exercise conn and reflected lists.

Returns
if connect succeeds
Return values
truesuccess
falsefailure

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual void makVrv::DtConnection::tick ( double  dt)
pure virtual

Function to be called repeatedly by a thread.

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual double makVrv::DtConnection::simTime ( ) const
pure virtual

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

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual void makVrv::DtConnection::setSimTime ( double  simTime)
pure virtual

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

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual double makVrv::DtConnection::clockTime ( ) const
pure virtual

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

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual DtTimeStampType makVrv::DtConnection::timeStampType ( ) const
pure virtual

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

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual void makVrv::DtConnection::pauseConnection ( )
virtual

Inform the connection that we are paused (sets the myIsPausedFlag to true)

virtual void makVrv::DtConnection::resumeConnection ( )
virtual

Inform the connection that we should resume (sets the myIsPausedFlag to false)

virtual bool makVrv::DtConnection::connectionIsPaused ( ) const
virtual

Check to see if the connection is paused.

virtual void makVrv::DtConnection::setViewControlChanged ( bool  enabled)
pure virtual

Set that the view controls have changed.

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual void makVrv::DtConnection::setConnectionFrameTime ( double  frameTime)
pure virtual

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

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual double makVrv::DtConnection::connectionFrameTime ( ) const
pure virtual

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

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual void makVrv::DtConnection::setUseTopoForFlatEarthVectorConversion ( bool  enabled)
pure 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.

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

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

handle observer position and orientation changes

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

virtual void makVrv::DtConnection::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 
)
pure virtual

handle observer poistion and orientation changes including rotational and linear velocities

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

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

Start publishing an observer.

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

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

Stop publishing an observer.

Implemented in makVrv::DtLegionConnection, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection.

void makVrv::DtConnection::tacticalGraphicIndicatorMouseDown ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)

Called when an tactical graphic is selected/deselected by the sim via its indicator.

void makVrv::DtConnection::tacticalGraphicIndicatorMouseUp ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
void makVrv::DtConnection::tacticalGraphicIndicatorMouseDblClick ( DtMouseState mouseState,
const DtUniqueID id,
const std::string &  displayEngineName,
const std::string &  windowName,
const std::string &  channelName 
)
void makVrv::DtConnection::setAppNumber ( int  appNumber)

Set the application number (for HLA connections only, DIS should use the initializer)

void makVrv::DtConnection::setSiteId ( int  siteId)

Set the site ID (useful for HLA connections only, DIS connections should use the initializer)

virtual bool makVrv::DtConnection::isDisconnecting ( ) const
virtual

Access flag to check if we are disconnecting. A signal is raised when the connection is being disconnected, which many objects listen to. However, sometimes one object needs to know that it should ignore something it's being asked to do, even if it hasn't received the signal yet (because the asker has). One example of this is the deletion of entities causing hidden aggregates to show themselves when they become childless. We really don't want that behavior if the reason it becomes childless is that we are shutting down. So when it's last child is deleted, it can check this flag and decide not to show itself in this circumstance.

virtual void makVrv::DtConnection::slot_dateChanged ( int  year,
DtDeTimeManager::Month  month,
int  day 
)
protectedvirtual

Listen for (event) signals from the DtDeTimeManagerSignal so we can keep our DtWorldMagneticModel copy up-to-date.

Member Data Documentation

boost::signalslib::signal<void (DtMouseState&, const DtUniqueID&, const std::string& displayEngineName, const std::string& windowName, const std::string& channelName)> makVrv::DtConnection::signal_tacticalGraphicIndicatorMouseDown

Emitted when an tactical graphic indicator is clicked.

boost::signalslib::signal<void (DtMouseState&, const DtUniqueID&, const std::string& displayEngineName, const std::string& windowName, const std::string& channelName)> makVrv::DtConnection::signal_tacticalGraphicIndicatorMouseUp
boost::signalslib::signal<void (DtMouseState&, const DtUniqueID&, const std::string& displayEngineName, const std::string& windowName, const std::string& channelName)> makVrv::DtConnection::signal_tacticalGraphicIndicatorMouseDblClick
boost::signalslib::signal<void (DtViewStateProcessor::ObserverAction&)> makVrv::DtConnection::signal_viewChanged

Emitted when a view control change is received.

boost::signalslib::signal<void ()> makVrv::DtConnection::signal_connected

Emitted when the connection finished connecting.

boost::signalslib::signal<void ()> makVrv::DtConnection::signal_toBeDisconnected

Emitted when the connection will be disconnecting.

DtEntityAppearanceMapperFactory* makVrv::DtConnection::myMapperFactory
protected

Factory responsible for creating Appearance Mappers.

DtWorldMagneticModel* makVrv::DtConnection::myWorldMagneticModel
protected
DtDisplayUnitsConverter* makVrv::DtConnection::myCoordinateConverter
protected
boost::signalslib::connection makVrv::DtConnection::myDateTimeSignalConnection
protected
int makVrv::DtConnection::myAppNumber
protected
int makVrv::DtConnection::mySiteId
protected
bool makVrv::DtConnection::myIsPausedFlag
protected
bool makVrv::DtConnection::myIsDisconnecting
protected

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)