VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrv::DtCigiBaseEntity Class Reference

This class provides an abstract base class for CIGI entities. More...

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

Public Member Functions

 DtCigiBaseEntity (DtCigiConnection &connection, DtAgentManagerInterface &sceneInterface, int entityId, int entityType)
 Constructor takes a DtCigiConnection, scene interface, and the CIGI entity ID/type.
virtual ~DtCigiBaseEntity ()
 Destructor.
virtual DtUniqueID uniqueId () const
 Returns the element ID of the entity's scene object.
virtual DtUniqueID elementId () const
 Returns the element ID of the entity's scene object.
virtual int cigiId () const
 Returns the CIGI Id of the CIGI entity.
virtual void init ()
virtual int entityType () const
 Get the entity type the entity was created with.
virtual void setVisible (bool yesNo)
 Set whether the entity is visible.
virtual bool isVisible () const
 Get the current visibility.
virtual void setDeadReckoningOn (bool onOff)
 Turns dead-reckoning on/off.
virtual bool isDeadReckoning () const
 Determine if the entity is dead reckoning.
virtual void setPosition (const DtGeodeticCoord &pos, bool force=false)
 Set the entity's geodetic position.
virtual const DtGeodeticCoord & position () const
 Returns the last position set by a CIGI entity control message.
virtual const DtVectorlocalPosition () const
 Returns the last computed local position set.
virtual void setOrientation (const DtTaitBryan &orientation, bool force=false)
 Set the entity's orientation.
virtual const DtTaitBryan & orientation () const
 Returns the last orientation set by a CIGI entity control message.
virtual const DtTaitBryan & localOrientation () const
 Returns the computed last local orientation.
virtual const DtTaitBryan & geocentricOrientation () const
 Get the last computed geocentric orientation.
virtual void setLinearRate (const DtVector &rate, bool useWorldCoordinates, bool force=false)
 Sets the entity's linear rate.
virtual const DtVectorlinearRate () const
 Get the last set linear rate.
virtual void setAngularRate (const DtVector &rate, bool useWorldCoordinates, bool force=false)
 Set's the entity's angular rate.
virtual const DtVectorangularRate () const
 Get the last set angular rate.
virtual void slot_deadReckoningAllowed (bool allowed)
 Called when IG-wide extrapolation is turned on or off.
virtual void setAlpha (int alpha)
 Sets the entity's alpha value.
virtual int alpha () const
 Returns the entity's alpha value.
virtual void setInheritAlpha (bool inherit)
 Set whether the entity should inherit alpha from its parent.
virtual bool isInheritingAlpha () const
 Determine if the entity is inheriting alpha.
virtual void slot_alphaChanged (int alpha, DtUniqueID id)
 Slot so we can check if the parent's alpha has changed.
virtual void setGroundClampingOn (DtGroundClampingUpdater::GroundClampingMode clampType)
 Turns ground clamping on/off.
virtual
DtGroundClampingUpdater::GroundClampingMode 
groundClampingType () const
 Get the current ground clamping type.
virtual void setArtPartTranslation (int partId, float xOffset, float yOffset, float zOffset, bool xEnable, bool yEnable, bool zEnable)
 Set the relative position of an articulated part.
virtual bool getArtPartTranslation (int partId, int &mappedPartId, DtVector &translation)
 Get the art part translation from a specified CIGI part id.
virtual void setArtPartOrientation (int partId, float yaw, float pitch, float roll, bool yawEnable, bool pitchEnable, bool rollEnable)
 Set the orientation of an articulated part.
virtual bool getArtPartOrientation (int partId, int &mappedPartId, DtTaitBryan &orientation)
 Returns false if the part id is not found.
virtual void setArtPartLinearRate (int partId, float xRate, float yRate, float zRate)
 Set the linear rate of an articulated part.
virtual bool getArtPartLinearRate (int partId, int &mappedPartId, DtVector &rate)
 Get the art part translation rate from a specified CIGI part id.
virtual bool getArtPartTranslationAndRate (int partId, int &mappedPartId, DtVector &translation, DtVector &rate)
 Get the art part translation and rate from a specified CIGI part id.
virtual void setArtPartAngularRate (int partId, float yawRate, float pitchRate, float rollRate)
 Set the angular rate of an articulated part.
virtual bool getArtPartAngularRate (int partId, int &mappedPartId, DtVector &rate)
 Returns false if the part id is not found.
virtual bool getArtPartOrientationAndRate (int partId, int &mappedPartId, DtTaitBryan &orientation, DtVector &rate)
 Returns false if the part id is not found.
virtual void setArtPartEnable (int partId, bool trueFalse)
 Enable/disable an articulated part.
virtual void setRelativeTo (DtCigiBaseEntity *parent)
 Attachment control.
virtual void setRelativePosition (const DtVector &pos)
 Sets the entity's relative position (if attached).
virtual void setRelativeOrientation (const DtTaitBryan &orient)
 Sets the entity's relative orientation (relative to the parent's body coordinates) if attached.
virtual bool isEmbarked () const
 Determine if the entity is attached to a parent entity.
virtual DtUniqueID embarkedParentId () const
 Get the element ID of the entity to which we are attached.

Public Attributes

boost::signal< void(int,
DtUniqueID)> 
signal_alphaChanged
 Emitted when this entity's alpha has changed.

Protected Member Functions

virtual void startDeadReckoning ()
 Create and set up Dead Reckoning updater.
virtual void endDeadReckoning ()
 Remove the Dead Reckoning updater.
virtual void startEmbarked ()
 Create and set up Embarkation updater.
virtual void endEmbarked ()
 Remove the Embarkation updater.
virtual void startGroundClamping ()
 Create and set up Ground Clamping updater.
virtual void endGroundClamping ()
 Remove the Ground Clamping updater.
virtual void buildGroundClampingUpdater ()

Protected Attributes

DtSceneObjectAgent * mySceneObject
DtModelAgent * myModel
DtDeadReckonUpdaterAgent * myDeadReckonUpdaterAgent
DtGroundClampingUpdaterAgent * myGroundClampingUpdaterAgent
DtEmbarkationUpdaterAgent * myEmbarkationUpdaterAgent
bool myDeadReckoningOn
bool myEmbarked
DtGroundClampingUpdater::GroundClampingMode myGroundClampingType
DtGeodeticCoord myLastPosition
DtVector myLastLocalPosition
DtTaitBryan myLastOrientation
DtTaitBryan myLastLocalOrientation
DtTaitBryan myLastGeocentricOrientation
DtVector myLastVelocity
DtVector myLastAngularVelocity
DtCigiConnectionmyConnection
DtAgentManagerInterfacemySceneInterface
int myEntityId
int myEntityType
DtCigiBaseEntitymyParent
DtUniqueID myEmbarkedParentID
bool myInheritAlpha
int myAlpha
bool myVisiblity
std::map< int, DtTaitBryan > myLastArtPartOrientation
std::map< int, DtVectormyLastArtPartTranslation
std::map< int, DtVectormyArtPartAngularRate
std::map< int, DtVectormyArtPartLinearRate
DtSignalConnectionManager mySignalConnections

Detailed Description

This class provides an abstract base class for CIGI entities.

These are created by the DtCigiEntityVisualizer and updated as CIGI messages that pertain to entities are processed.

Constructor & Destructor Documentation

makVrv::DtCigiBaseEntity::DtCigiBaseEntity ( DtCigiConnection connection,
DtAgentManagerInterface sceneInterface,
int  entityId,
int  entityType 
)

Constructor takes a DtCigiConnection, scene interface, and the CIGI entity ID/type.

virtual makVrv::DtCigiBaseEntity::~DtCigiBaseEntity ( )
virtual

Destructor.

Member Function Documentation

virtual DtUniqueID makVrv::DtCigiBaseEntity::uniqueId ( ) const
virtual

Returns the element ID of the entity's scene object.

Use of this method is deprecated; use elementId()

virtual DtUniqueID makVrv::DtCigiBaseEntity::elementId ( ) const
virtual

Returns the element ID of the entity's scene object.

virtual int makVrv::DtCigiBaseEntity::cigiId ( ) const
virtual

Returns the CIGI Id of the CIGI entity.

virtual void makVrv::DtCigiBaseEntity::init ( )
virtual
virtual int makVrv::DtCigiBaseEntity::entityType ( ) const
virtual

Get the entity type the entity was created with.

virtual void makVrv::DtCigiBaseEntity::setVisible ( bool  yesNo)
virtual

Set whether the entity is visible.

Reimplemented in makVrv::DtCigiWakeEntity.

virtual bool makVrv::DtCigiBaseEntity::isVisible ( ) const
virtual

Get the current visibility.

virtual void makVrv::DtCigiBaseEntity::setDeadReckoningOn ( bool  onOff)
virtual

Turns dead-reckoning on/off.

virtual bool makVrv::DtCigiBaseEntity::isDeadReckoning ( ) const
virtual

Determine if the entity is dead reckoning.

virtual void makVrv::DtCigiBaseEntity::setPosition ( const DtGeodeticCoord &  pos,
bool  force = false 
)
virtual

Set the entity's geodetic position.

Parameters
[in]posis the position set from the CIGI entity control message.
[in]forceis a flag to force handling even if position has not changed.

Reimplemented in makVrv::DtCigiWakeEntity, makVrv::DtCigiWatercraftEntity, and makVrv::DtCigiCharacterEntity.

virtual const DtGeodeticCoord& makVrv::DtCigiBaseEntity::position ( ) const
virtual

Returns the last position set by a CIGI entity control message.

virtual const DtVector& makVrv::DtCigiBaseEntity::localPosition ( ) const
virtual

Returns the last computed local position set.

virtual void makVrv::DtCigiBaseEntity::setOrientation ( const DtTaitBryan &  orientation,
bool  force = false 
)
virtual

Set the entity's orientation.

Parameters
[in]orientationis the orientation set from the CIGI entity control message.
[in]forceis a flag to force handling even if orientation has not changed.

Reimplemented in makVrv::DtCigiWakeEntity, makVrv::DtCigiWatercraftEntity, and makVrv::DtCigiCharacterEntity.

virtual const DtTaitBryan& makVrv::DtCigiBaseEntity::orientation ( ) const
virtual

Returns the last orientation set by a CIGI entity control message.

virtual const DtTaitBryan& makVrv::DtCigiBaseEntity::localOrientation ( ) const
virtual

Returns the computed last local orientation.

virtual const DtTaitBryan& makVrv::DtCigiBaseEntity::geocentricOrientation ( ) const
virtual

Get the last computed geocentric orientation.

virtual void makVrv::DtCigiBaseEntity::setLinearRate ( const DtVector rate,
bool  useWorldCoordinates,
bool  force = false 
)
virtual

Sets the entity's linear rate.

If useWorldCoordinates is set to true, sets the velocity according to the entity's rate with respect to the tangential reference plane of the entity. Otherwise, sets the velocity with respect to the entity's coordinate system.

Reimplemented in makVrv::DtCigiWakeEntity, and makVrv::DtCigiWatercraftEntity.

virtual const DtVector& makVrv::DtCigiBaseEntity::linearRate ( ) const
virtual

Get the last set linear rate.

virtual void makVrv::DtCigiBaseEntity::setAngularRate ( const DtVector rate,
bool  useWorldCoordinates,
bool  force = false 
)
virtual

Set's the entity's angular rate.

If useWorldCoordinates is set to true, sets the angular velocity with respect to the tangential reference plane of the entity. Otherwise, sets the velocity with respect to the entity's coordinate system.

virtual const DtVector& makVrv::DtCigiBaseEntity::angularRate ( ) const
virtual

Get the last set angular rate.

virtual void makVrv::DtCigiBaseEntity::setRelativeTo ( DtCigiBaseEntity parent)
virtual

Attachment control.

Attach entity to parent

Reimplemented in makVrv::DtCigiWakeEntity.

virtual void makVrv::DtCigiBaseEntity::setRelativePosition ( const DtVector pos)
virtual

Sets the entity's relative position (if attached).

Reimplemented in makVrv::DtCigiWakeEntity.

virtual void makVrv::DtCigiBaseEntity::setRelativeOrientation ( const DtTaitBryan &  orient)
virtual

Sets the entity's relative orientation (relative to the parent's body coordinates) if attached.

Reimplemented in makVrv::DtCigiWakeEntity.

virtual bool makVrv::DtCigiBaseEntity::isEmbarked ( ) const
virtual

Determine if the entity is attached to a parent entity.

virtual DtUniqueID makVrv::DtCigiBaseEntity::embarkedParentId ( ) const
virtual

Get the element ID of the entity to which we are attached.

virtual void makVrv::DtCigiBaseEntity::slot_deadReckoningAllowed ( bool  allowed)
virtual

Called when IG-wide extrapolation is turned on or off.

Stops the entity from dead reckoning if it currently is (but remembers if it was) and turns dead reckoning on if the entity has requested dead reckoning and it becomes allowed again

virtual void makVrv::DtCigiBaseEntity::setAlpha ( int  alpha)
virtual

Sets the entity's alpha value.

virtual int makVrv::DtCigiBaseEntity::alpha ( ) const
virtual

Returns the entity's alpha value.

This needs to be checked if the entity is inheriting its parent's alpha.

virtual void makVrv::DtCigiBaseEntity::setInheritAlpha ( bool  inherit)
virtual

Set whether the entity should inherit alpha from its parent.

virtual bool makVrv::DtCigiBaseEntity::isInheritingAlpha ( ) const
virtual

Determine if the entity is inheriting alpha.

virtual void makVrv::DtCigiBaseEntity::slot_alphaChanged ( int  alpha,
DtUniqueID  id 
)
virtual

Slot so we can check if the parent's alpha has changed.

virtual void makVrv::DtCigiBaseEntity::setGroundClampingOn ( DtGroundClampingUpdater::GroundClampingMode  clampType)
virtual

Turns ground clamping on/off.

virtual DtGroundClampingUpdater::GroundClampingMode makVrv::DtCigiBaseEntity::groundClampingType ( ) const
virtual

Get the current ground clamping type.

virtual void makVrv::DtCigiBaseEntity::setArtPartTranslation ( int  partId,
float  xOffset,
float  yOffset,
float  zOffset,
bool  xEnable,
bool  yEnable,
bool  zEnable 
)
virtual

Set the relative position of an articulated part.

Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.

virtual bool makVrv::DtCigiBaseEntity::getArtPartTranslation ( int  partId,
int &  mappedPartId,
DtVector translation 
)
virtual

Get the art part translation from a specified CIGI part id.

Returns false if the part id is not found.

virtual void makVrv::DtCigiBaseEntity::setArtPartOrientation ( int  partId,
float  yaw,
float  pitch,
float  roll,
bool  yawEnable,
bool  pitchEnable,
bool  rollEnable 
)
virtual

Set the orientation of an articulated part.

Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.

virtual bool makVrv::DtCigiBaseEntity::getArtPartOrientation ( int  partId,
int &  mappedPartId,
DtTaitBryan &  orientation 
)
virtual

Returns false if the part id is not found.

virtual void makVrv::DtCigiBaseEntity::setArtPartLinearRate ( int  partId,
float  xRate,
float  yRate,
float  zRate 
)
virtual

Set the linear rate of an articulated part.

Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.

virtual bool makVrv::DtCigiBaseEntity::getArtPartLinearRate ( int  partId,
int &  mappedPartId,
DtVector rate 
)
virtual

Get the art part translation rate from a specified CIGI part id.

Returns false if the part id is not found.

virtual bool makVrv::DtCigiBaseEntity::getArtPartTranslationAndRate ( int  partId,
int &  mappedPartId,
DtVector translation,
DtVector rate 
)
virtual

Get the art part translation and rate from a specified CIGI part id.

Returns false if the part id is not found.

virtual void makVrv::DtCigiBaseEntity::setArtPartAngularRate ( int  partId,
float  yawRate,
float  pitchRate,
float  rollRate 
)
virtual

Set the angular rate of an articulated part.

Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.

virtual bool makVrv::DtCigiBaseEntity::getArtPartAngularRate ( int  partId,
int &  mappedPartId,
DtVector rate 
)
virtual

Returns false if the part id is not found.

virtual bool makVrv::DtCigiBaseEntity::getArtPartOrientationAndRate ( int  partId,
int &  mappedPartId,
DtTaitBryan &  orientation,
DtVector rate 
)
virtual

Returns false if the part id is not found.

virtual void makVrv::DtCigiBaseEntity::setArtPartEnable ( int  partId,
bool  trueFalse 
)
virtual

Enable/disable an articulated part.

Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.

virtual void makVrv::DtCigiBaseEntity::startDeadReckoning ( )
protectedvirtual

Create and set up Dead Reckoning updater.

Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiWatercraftEntity.

virtual void makVrv::DtCigiBaseEntity::endDeadReckoning ( )
protectedvirtual

Remove the Dead Reckoning updater.

Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiWatercraftEntity.

virtual void makVrv::DtCigiBaseEntity::startEmbarked ( )
protectedvirtual

Create and set up Embarkation updater.

Reimplemented in makVrv::DtCigiCharacterEntity.

virtual void makVrv::DtCigiBaseEntity::endEmbarked ( )
protectedvirtual

Remove the Embarkation updater.

Reimplemented in makVrv::DtCigiCharacterEntity.

virtual void makVrv::DtCigiBaseEntity::startGroundClamping ( )
protectedvirtual

Create and set up Ground Clamping updater.

Reimplemented in makVrv::DtCigiCharacterEntity.

virtual void makVrv::DtCigiBaseEntity::endGroundClamping ( )
protectedvirtual

Remove the Ground Clamping updater.

Reimplemented in makVrv::DtCigiCharacterEntity.

virtual void makVrv::DtCigiBaseEntity::buildGroundClampingUpdater ( )
protectedvirtual

Member Data Documentation

boost::signal<void (int, DtUniqueID)> makVrv::DtCigiBaseEntity::signal_alphaChanged

Emitted when this entity's alpha has changed.

DtSceneObjectAgent* makVrv::DtCigiBaseEntity::mySceneObject
protected
DtModelAgent* makVrv::DtCigiBaseEntity::myModel
protected
DtDeadReckonUpdaterAgent* makVrv::DtCigiBaseEntity::myDeadReckonUpdaterAgent
protected
DtGroundClampingUpdaterAgent* makVrv::DtCigiBaseEntity::myGroundClampingUpdaterAgent
protected
DtEmbarkationUpdaterAgent* makVrv::DtCigiBaseEntity::myEmbarkationUpdaterAgent
protected
bool makVrv::DtCigiBaseEntity::myDeadReckoningOn
protected
bool makVrv::DtCigiBaseEntity::myEmbarked
protected
DtGroundClampingUpdater::GroundClampingMode makVrv::DtCigiBaseEntity::myGroundClampingType
protected
DtGeodeticCoord makVrv::DtCigiBaseEntity::myLastPosition
protected
DtVector makVrv::DtCigiBaseEntity::myLastLocalPosition
protected
DtTaitBryan makVrv::DtCigiBaseEntity::myLastOrientation
protected
DtTaitBryan makVrv::DtCigiBaseEntity::myLastLocalOrientation
protected
DtTaitBryan makVrv::DtCigiBaseEntity::myLastGeocentricOrientation
protected
DtVector makVrv::DtCigiBaseEntity::myLastVelocity
protected
DtVector makVrv::DtCigiBaseEntity::myLastAngularVelocity
protected
DtCigiConnection& makVrv::DtCigiBaseEntity::myConnection
protected
DtAgentManagerInterface& makVrv::DtCigiBaseEntity::mySceneInterface
protected
int makVrv::DtCigiBaseEntity::myEntityId
protected
int makVrv::DtCigiBaseEntity::myEntityType
protected
DtCigiBaseEntity* makVrv::DtCigiBaseEntity::myParent
protected
DtUniqueID makVrv::DtCigiBaseEntity::myEmbarkedParentID
protected
bool makVrv::DtCigiBaseEntity::myInheritAlpha
protected
int makVrv::DtCigiBaseEntity::myAlpha
protected
bool makVrv::DtCigiBaseEntity::myVisiblity
protected
std::map<int, DtTaitBryan> makVrv::DtCigiBaseEntity::myLastArtPartOrientation
protected
std::map<int, DtVector> makVrv::DtCigiBaseEntity::myLastArtPartTranslation
protected
std::map<int, DtVector> makVrv::DtCigiBaseEntity::myArtPartAngularRate
protected
std::map<int, DtVector> makVrv::DtCigiBaseEntity::myArtPartLinearRate
protected
DtSignalConnectionManager makVrv::DtCigiBaseEntity::mySignalConnections
protected

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

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)