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

A DtCigiWakeEntity is a CIGI entity that loads an wake model. More...

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

Public Member Functions

 DtCigiWakeEntity (DtCigiConnection &connection, DtAgentManagerInterface &sceneInterface, int entityId, int entityType)
 Constructor.
virtual ~DtCigiWakeEntity ()
 Destructor.
virtual void uninit ()
 Calls down DtCigiBaseEntity::uninit() and then calls destroyModelAgents()
virtual void setPosition (const DtGeodeticCoord &pos, bool force=false)
 Set the entity's geodetic position.
virtual void setRelativePosition (const DtVector &pos)
 Sets the entity's relative position (if attached).
virtual void setOrientation (const DtTaitBryan &orient, bool force=false)
 Set the entity's orientation.
virtual void setRelativeOrientation (const DtTaitBryan &orient)
 Sets the entity's relative orientation (relative to the parent's body coordinates) if attached.
virtual void setRelativeTo (DtCigiBaseEntity *parent)
 Attachment control - override base class so we can tell parent about us.
virtual void setLinearRate (const DtVector &rate, bool useWorldCoordinates, bool force=false)
 Sets the entity's linear rate.
virtual void setSprayEnabled (bool enabled)
 Enable or disable spray at the bow and hull of the ship.
virtual void setWakeOffset (double offset)
 Set the distance from the center of the ship to the origin point of the circles use to generate the wake.
virtual void setBowSprayOffset (double offset)
 Set the distance from the wake origin to where the spray appears, if enabled.
virtual void setBowWaveOffset (double offset)
 Set the offset to the bow wake.
virtual void setSternWaveOffset (double offset)
 Set the offset to the stern wakes.
virtual void setShipLength (double length)
 Set the length of the ship.
virtual void setBeamWidth (double width)
 Set the beam width (widest point) of the ship.
virtual void setPropWashEnabled (bool b)
 Set whether prop wash effects are enabled.
virtual void setPropWashOffset (double offset)
 Set the distance from the wake origin to where the prop wash appears, if enabled.
virtual void setPropWashFadeTime (double fadeTime)
 Set the amount of time, in seconds, over which the prop wash will dissipate.
virtual void setDraft (double draft)
 Set the draft, or the distance the hull extends underwater.
virtual void setLODDistance (double distance)
 Set the distance beyond which wakes are disabled.
virtual void setSprayVelocityScale (double scale)
 Set the velocity scaling for bow spray effects.
virtual void setBowWaveScale (double scale)
 Set the scaling for bow wave effects.
virtual void setMaxBowWaveAmplitude (double amplitude)
 Set the max amplitude for bow waves.
virtual void setBowSize (double size)
 Set the size of the bow (0 for a pointy one.)
virtual void setSpraySizeScale (double scale)
 Set the particle size scaling for bow spray effects.
virtual void setNumHullSprays (int numSprays)
 Set the number of spray particle systems emitted along the hull of the ship.
virtual void setHullSpraySizeScale (double scale)
 Set the initial size of hull spray particles.
virtual void setHullSprayStart (double offset)
 Set the start offset of hull spray effects.
virtual void setHullSprayEnd (double offset)
 Set the end offset of hull spray effects.
virtual void setHullSprayVelocityScale (double scale)
 Set the initial velocity of hull spray particles as a percent of the ship velocity.
virtual void setHullSprayVerticalOffset (double offset)
 Set the initial vertical position of hull spray particles.
virtual void setVisible (bool isVisible)
 Set whether the entity is visible.
virtual void setIsSinking (bool sinking)
 Stop the wake if the ship is sinking.
- Public Member Functions inherited from makVrv::DtCigiBaseEntity
 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 ()
 Create the scene object used by the entity and report the entity element and its parameters.
virtual void restart ()
 Calls uninit(), init(), and then restores dead reckoning, embarkation, etc.
virtual void restartRequest ()
 This is called to request that the entity be restarted.
virtual int entityType () const
 Get the entity type the entity was created with.
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 ACTUALLY dead reckoning.
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 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 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 slot_entityToBeDeleted (int cigiEntityId)
 Connected to the signal raised by the entity manager when an entity is removed, this is used to insure that signals connected to an embarkation parent are managed correctly if/when that parent is deleted.
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 DtSceneObjectAgent * findSceneObjectAgent ()
virtual bool isEmbarked () const
 Determine if the entity is attached to a parent entity.
virtual int embarkedParentId () const
 Get the CIGI ID of the entity to which we are attached.

Protected Member Functions

virtual void addToParent (DtSceneObjectAgent *parent)
virtual void removeFromParent (DtSceneObjectAgent *parent)
virtual void createModelAgents ()
virtual void destroyModelAgents ()
virtual void slot_wakeDefaultLODDistanceChanged (double distance)
virtual void slot_wakesEnabledChanged (bool enabled)
- Protected Member Functions inherited from makVrv::DtCigiBaseEntity
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; uses buildGroundClampingUpdater() to create the updater agents.
virtual void buildGroundClampingUpdater ()
 Create and intialize the ground clamping updater agents.
virtual void endGroundClamping ()
 Remove the Ground Clamping updater.
virtual bool isGroundClamping () const
 Returns false if ground clamping type is DtGroundClampingUpdater::ClampNone true otherwise.
virtual void getExtrapolatedValuesAndRestart ()
 Request position and orientation values from the render thread if this entity is dead reckoned.
virtual void delayedStartEmbarked ()
 When an embarked entity is restarted, it needs to be reattached to its parent at the start of the next frame (after all other entities have been restarted).
virtual void queryExtrapolatedPositionAndOrientation (DtUniqueID drAgentId, bool relative)
 This is the render thread-run method that collects dead reckoned position and orientation.
virtual void returnExtrapolatedPositionAndOrientation (const DtVector &resultPos, const DtTaitBryan &resultOri, bool relative, bool invokeRestart)
 This method returns the position and orientation collected from the render thread in the connection thread.
virtual DtDeadReckonUpdaterfindDRUpdaterInRenderThread (DtUniqueID drAgentId) const
 Helper function called by queryExtrapolatedPositionAndOrientation to look up the the dead reckon updater object given its agent id.

Protected Attributes

DtWakeModelAgent * myWakeModelAgent
DtWakeUpdaterAgent * myWakeUpdaterAgent
DtSignalConnectionManager myConnections
boost::signalslib::connection myWakeLODDistanceChangedConnection
bool myIsSinking
double myWakeLODRange
- Protected Attributes inherited from makVrv::DtCigiBaseEntity
DtSceneObjectAgent * mySceneObject
DtModelAgent * myModel
std::string myEntityModelDefName
DtDeadReckonUpdaterAgent * myDeadReckonUpdaterAgent
DtGroundClampingUpdaterAgent * myGroundClampingUpdaterAgent
DtEmbarkationUpdaterAgent * myEmbarkationUpdaterAgent
bool myDeadReckoningOn
bool myEmbarked
DtGroundClampingUpdater::GroundClampingMode myGroundClampingType
DtGeodeticCoord myLastPosition
DtVector myLastLocalPosition
DtTaitBryan myLastOrientation
DtTaitBryan myLastLocalOrientation
DtTaitBryan myLastGeocentricOrientation
DtVector myLastRelativePosition
DtTaitBryan myLastRelativeOrientation
DtVector myLastVelocity
bool myLastVelocityWorldCoordinates
DtVector myLastAngularVelocity
bool myLastAngularVelocityWorldCoordinates
DtCigiConnectionmyConnection
DtAgentManagerInterfacemySceneInterface
int myEntityId
int myEntityType
DtCigiBaseEntitymyParent
int myEmbarkedParentID
bool myInheritAlpha
int myAlpha
bool myVisiblity
bool myPositionSet
bool myOrientationSet
std::map< int, DtTaitBryan > myLastArtPartOrientation
std::map< int, DtVectormyLastArtPartTranslation
std::map< int, DtVectormyArtPartAngularRate
std::map< int, DtVectormyArtPartLinearRate
DtSignalConnectionManager mySignalConnections

Friends

class DtCigiWatercraftEntity

Additional Inherited Members

- Public Attributes inherited from makVrv::DtCigiBaseEntity
boost::signal< void(int,
DtUniqueID)> 
signal_alphaChanged
 Emitted when this entity's alpha has changed.

Detailed Description

A DtCigiWakeEntity is a CIGI entity that loads an wake model.

Constructor & Destructor Documentation

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

Constructor.

virtual makVrv::DtCigiWakeEntity::~DtCigiWakeEntity ( )
virtual

Destructor.

Member Function Documentation

virtual void makVrv::DtCigiWakeEntity::uninit ( )
virtual

Calls down DtCigiBaseEntity::uninit() and then calls destroyModelAgents()

Reimplemented from makVrv::DtCigiBaseEntity.

virtual void makVrv::DtCigiWakeEntity::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 from makVrv::DtCigiBaseEntity.

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

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

Reimplemented from makVrv::DtCigiBaseEntity.

virtual void makVrv::DtCigiWakeEntity::setOrientation ( const DtTaitBryan &  orient,
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 from makVrv::DtCigiBaseEntity.

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

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

Reimplemented from makVrv::DtCigiBaseEntity.

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

Attachment control - override base class so we can tell parent about us.

Reimplemented from makVrv::DtCigiBaseEntity.

virtual void makVrv::DtCigiWakeEntity::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 from makVrv::DtCigiBaseEntity.

virtual void makVrv::DtCigiWakeEntity::setSprayEnabled ( bool  enabled)
virtual

Enable or disable spray at the bow and hull of the ship.

virtual void makVrv::DtCigiWakeEntity::setWakeOffset ( double  offset)
virtual

Set the distance from the center of the ship to the origin point of the circles use to generate the wake.

virtual void makVrv::DtCigiWakeEntity::setBowSprayOffset ( double  offset)
virtual

Set the distance from the wake origin to where the spray appears, if enabled.

virtual void makVrv::DtCigiWakeEntity::setBowWaveOffset ( double  offset)
virtual

Set the offset to the bow wake.

virtual void makVrv::DtCigiWakeEntity::setSternWaveOffset ( double  offset)
virtual

Set the offset to the stern wakes.

virtual void makVrv::DtCigiWakeEntity::setShipLength ( double  length)
virtual

Set the length of the ship.

virtual void makVrv::DtCigiWakeEntity::setBeamWidth ( double  width)
virtual

Set the beam width (widest point) of the ship.

virtual void makVrv::DtCigiWakeEntity::setPropWashEnabled ( bool  b)
virtual

Set whether prop wash effects are enabled.

virtual void makVrv::DtCigiWakeEntity::setPropWashOffset ( double  offset)
virtual

Set the distance from the wake origin to where the prop wash appears, if enabled.

virtual void makVrv::DtCigiWakeEntity::setPropWashFadeTime ( double  fadeTime)
virtual

Set the amount of time, in seconds, over which the prop wash will dissipate.

virtual void makVrv::DtCigiWakeEntity::setDraft ( double  draft)
virtual

Set the draft, or the distance the hull extends underwater.

Used to influence the bow wake.

virtual void makVrv::DtCigiWakeEntity::setLODDistance ( double  distance)
virtual

Set the distance beyond which wakes are disabled.

Normally the value in the wake model definition is used. If that is not set, then the default wake LOD distance entity setting is used. If this method is called and the default wake LOD distance was being used the entity will disconnect from the defaultWakeLODDistance signal and use the value passed here instead.

virtual void makVrv::DtCigiWakeEntity::setSprayVelocityScale ( double  scale)
virtual

Set the velocity scaling for bow spray effects.

virtual void makVrv::DtCigiWakeEntity::setBowWaveScale ( double  scale)
virtual

Set the scaling for bow wave effects.

virtual void makVrv::DtCigiWakeEntity::setMaxBowWaveAmplitude ( double  amplitude)
virtual

Set the max amplitude for bow waves.

virtual void makVrv::DtCigiWakeEntity::setBowSize ( double  size)
virtual

Set the size of the bow (0 for a pointy one.)

virtual void makVrv::DtCigiWakeEntity::setSpraySizeScale ( double  scale)
virtual

Set the particle size scaling for bow spray effects.

virtual void makVrv::DtCigiWakeEntity::setNumHullSprays ( int  numSprays)
virtual

Set the number of spray particle systems emitted along the hull of the ship.

virtual void makVrv::DtCigiWakeEntity::setHullSpraySizeScale ( double  scale)
virtual

Set the initial size of hull spray particles.

virtual void makVrv::DtCigiWakeEntity::setHullSprayStart ( double  offset)
virtual

Set the start offset of hull spray effects.

virtual void makVrv::DtCigiWakeEntity::setHullSprayEnd ( double  offset)
virtual

Set the end offset of hull spray effects.

virtual void makVrv::DtCigiWakeEntity::setHullSprayVelocityScale ( double  scale)
virtual

Set the initial velocity of hull spray particles as a percent of the ship velocity.

virtual void makVrv::DtCigiWakeEntity::setHullSprayVerticalOffset ( double  offset)
virtual

Set the initial vertical position of hull spray particles.

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

Set whether the entity is visible.

Reimplemented from makVrv::DtCigiBaseEntity.

virtual void makVrv::DtCigiWakeEntity::setIsSinking ( bool  sinking)
virtual

Stop the wake if the ship is sinking.

virtual void makVrv::DtCigiWakeEntity::addToParent ( DtSceneObjectAgent *  parent)
protectedvirtual
virtual void makVrv::DtCigiWakeEntity::removeFromParent ( DtSceneObjectAgent *  parent)
protectedvirtual
virtual void makVrv::DtCigiWakeEntity::createModelAgents ( )
protectedvirtual
virtual void makVrv::DtCigiWakeEntity::destroyModelAgents ( )
protectedvirtual
virtual void makVrv::DtCigiWakeEntity::slot_wakeDefaultLODDistanceChanged ( double  distance)
protectedvirtual
virtual void makVrv::DtCigiWakeEntity::slot_wakesEnabledChanged ( bool  enabled)
protectedvirtual

Friends And Related Function Documentation

friend class DtCigiWatercraftEntity
friend

Member Data Documentation

DtWakeModelAgent* makVrv::DtCigiWakeEntity::myWakeModelAgent
protected
DtWakeUpdaterAgent* makVrv::DtCigiWakeEntity::myWakeUpdaterAgent
protected
DtSignalConnectionManager makVrv::DtCigiWakeEntity::myConnections
protected
boost::signalslib::connection makVrv::DtCigiWakeEntity::myWakeLODDistanceChangedConnection
protected
bool makVrv::DtCigiWakeEntity::myIsSinking
protected
double makVrv::DtCigiWakeEntity::myWakeLODRange
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)