VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Protected Attributes | Private Types | Private Member Functions
makVrv::DtMultiDeadReckonUpdater Class Reference

DtMultiDeadReckonUpdater is an updater that takes kinematic updates for multiple indices and updates a single scene object with dead reckoned values at each index. More...

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

Public Member Functions

 DtMultiDeadReckonUpdater (DtDe &de, DtUniqueID id, bool suppressTick=false)
 CTOR.
virtual ~DtMultiDeadReckonUpdater ()
 Virtual DTOR.
virtual void update (DtTime tNow)
 Push the update data to the scene object.
virtual void setPosition (int vtx, const DtVector &pos)
 Set the position of a scene object vertex.
virtual void setOrientation (int vtx, const DtTaitBryan &ori)
 Set the orientation of a scene object vertex.
virtual void setVelocity (int vtx, const DtVector &velo)
 Set the velocity of a scene object vertex.
virtual void setAcceleration (int vtx, const DtVector &accel)
 Set the acceleration of a scene object vertex.
virtual void setAngularVelocity (int vtx, const DtVector &velo)
 Set the angular velocity of a scene object vertex.
virtual void setDeadReckoningSettings (bool pos, bool ori, bool velo)
 Set the object's dead reckoning settings at all vertices.
virtual void setSmoothingEnabled (bool enabled)
 Enable or disable smoothing for all vertices.
virtual void setSmoothingPeriod (float period)
 Set the period for the smoothing calculation.
virtual void updateSpacial (DtTime tNow)
 Update the spacial attributes using the current simulation time.
virtual void setMotionModel (const std::string &modelName)
 Set which motion model the object should use.
virtual DtMotionModelmotionModel (int vtx)
 Get the motion model at a given vertex.
virtual void setUseAbsoluteTimeStamping (bool)
 Sets whether or not to use absolute time stamping (default is false).
bool useAbsoluteTimeStamping () const
- Public Member Functions inherited from makVrv::DtSceneObjectUpdater
 DtSceneObjectUpdater (DtDe &de, DtUniqueID id, bool suppressTick=false)
 CTOR.
virtual ~DtSceneObjectUpdater ()
 Virtual DTOR.
virtual bool needsUpdate (DtTime tNow)
 The check function called by DtTickableManager to verify if an update is required.
virtual DtTime lastUpdateTime () const
 Get the time-stamp of the last update.
virtual void setSceneObject (DtSceneObject *sceneObject)
 Set the scene object to be updated.
DtSceneObjectfindSceneObject ()
 Get the current scene object for this updater.
DtUniqueID uniqueId () const
 Returns the distributed object id of this updater.
virtual void setUpdaterPosition (int vtx, const DtVector &pos)
 Set the position of a scene object vertex.
virtual const DtVectorupdaterPosition (int vtx) const
 Get the position of a scene object vertex.
virtual void setUpdaterOrientation (int vtx, const DtTaitBryan &ori)
 Set the orientation of a scene object vertex.
virtual const DtTaitBryan & updaterOrientation (int vtx) const
 Get the orientation of a scene object vertex.
void updateSceneObject (DtTime tNow)
 Update the scene object position and orientation at each vertex and set the last updated time-stamp.
virtual void terrainScaleTransformsIfNeeded ()
 Scales the transforms if the terrain scaling flag is set.

Protected Attributes

MotionModels myMotionModels
std::string myMotionModelType
DtDeadReckonTypes myDeadReckonTypes
float mySmoothingPeriod
bool mySmoothingEnabled
bool myUseAbsoluteTimeStamping
- Protected Attributes inherited from makVrv::DtSceneObjectUpdater
DtDemyDe
 The display engine.
DtUniqueID myUniqueId
 This distributed object's unique identifier.
DtSceneObjectmySceneObject
 A pointer to the current scene object being updated.
DtTime myLastUpdateTime
 The last time stamp when the updateSceneObject() was called.
DtSceneObject::TransformList myTransforms
 Local copy of the vertex positions and orientations.
const DtDeSharedStatemyDeSharedState
 This is kept to make terrain scale updating cheaper ( by one virtual function call ).
bool myInManager
 If tick was suppressed, then this updater is not on the tickableManager.

Private Types

typedef std::vector
< DtMotionModel * > 
MotionModels

Private Member Functions

DtMotionModelcreateMotionModel (DtMotionModel *other)
 Helper function to create and initialize a new motion model with data from a previous motion model and current updater state.
void applyToAllMotionModels (const boost::function< void(DtMotionModel *)> &func)
 A helper function to call the same function on all the motion models.

Additional Inherited Members

- Public Attributes inherited from makVrv::DtSceneObjectUpdater
boost::signal< void(const
DtUniqueID &) > 
signal_updaterToBeDeleted
 Signal that this updater is being destroyed.
- Protected Member Functions inherited from makVrv::DtSceneObjectUpdater
virtual void slot_sceneObjectToBeDeleted (const DtUniqueID &id)
 Signal that this updater is being destroyed.
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager=NULL)
 CTOR.
virtual ~DtTickable ()
 Virtual DTOR.

Detailed Description

DtMultiDeadReckonUpdater is an updater that takes kinematic updates for multiple indices and updates a single scene object with dead reckoned values at each index.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtMultiDeadReckonUpdater::DtMultiDeadReckonUpdater ( DtDe de,
DtUniqueID  id,
bool  suppressTick = false 
)

CTOR.

Parameters
[in]deis the display engine.
[in]idis a unique identifier for this distributed object.
[in]suppressTickis a flag instructing to not register with a DtTickableManager when set true, default is false.
virtual makVrv::DtMultiDeadReckonUpdater::~DtMultiDeadReckonUpdater ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual void makVrv::DtMultiDeadReckonUpdater::update ( DtTime  tNow)
virtual

Push the update data to the scene object.

Parameters
[in]tNowis the current time.

Implements makVrv::DtSceneObjectUpdater.

virtual void makVrv::DtMultiDeadReckonUpdater::setPosition ( int  vtx,
const DtVector pos 
)
virtual

Set the position of a scene object vertex.

Parameters
[in]vtxis the vertex of the scene object.
[in]posis the position to set.

Reimplemented in makVrv::DtTacticalSmokeUpdater.

virtual void makVrv::DtMultiDeadReckonUpdater::setOrientation ( int  vtx,
const DtTaitBryan &  ori 
)
virtual

Set the orientation of a scene object vertex.

Parameters
[in]vtxis the vertex of the scene object.
[in]oriis the orientation to set.

Reimplemented in makVrv::DtTacticalSmokeUpdater.

virtual void makVrv::DtMultiDeadReckonUpdater::setVelocity ( int  vtx,
const DtVector velo 
)
virtual

Set the velocity of a scene object vertex.

Parameters
[in]vtxis the vertex of the scene object.
[in]velois the velocity to set.

Reimplemented in makVrv::DtTacticalSmokeUpdater.

virtual void makVrv::DtMultiDeadReckonUpdater::setAcceleration ( int  vtx,
const DtVector accel 
)
virtual

Set the acceleration of a scene object vertex.

Parameters
[in]vtxis the vertex of the scene object.
[in]accelis the acceleration to set.

Reimplemented in makVrv::DtTacticalSmokeUpdater.

virtual void makVrv::DtMultiDeadReckonUpdater::setAngularVelocity ( int  vtx,
const DtVector velo 
)
virtual

Set the angular velocity of a scene object vertex.

Parameters
[in]vtxis the vertex of the scene object.
[in]velois the angular velocity to set.

Reimplemented in makVrv::DtTacticalSmokeUpdater.

virtual void makVrv::DtMultiDeadReckonUpdater::setDeadReckoningSettings ( bool  pos,
bool  ori,
bool  velo 
)
virtual

Set the object's dead reckoning settings at all vertices.

Parameters
[in]posis the position dead-reckoning flag, default is true.
[in]oriis the orientation dead-reckoning flag, default is true.
[in]velois the velocity dead-reckoning flag, default is true.
Note
Setting true will enable dead-reckoning for the respective attribute, setting false will disable dead-reckoning.
virtual void makVrv::DtMultiDeadReckonUpdater::setSmoothingEnabled ( bool  enabled)
virtual

Enable or disable smoothing for all vertices.

Parameters
[in]enabledis the new smoothing state.
virtual void makVrv::DtMultiDeadReckonUpdater::setSmoothingPeriod ( float  period)
virtual

Set the period for the smoothing calculation.

Parameters
[in]periodis the time for smoothing.
Note
This value is only used when smoothing is enabled.
See Also
setSmoothingEnabled( bool ).
virtual void makVrv::DtMultiDeadReckonUpdater::updateSpacial ( DtTime  tNow)
virtual

Update the spacial attributes using the current simulation time.

Parameters
[in]tNowis the current simulation time.
virtual void makVrv::DtMultiDeadReckonUpdater::setMotionModel ( const std::string &  modelName)
virtual

Set which motion model the object should use.

Parameters
[in]modelNameis the name of a motion model.
virtual DtMotionModel* makVrv::DtMultiDeadReckonUpdater::motionModel ( int  vtx)
virtual

Get the motion model at a given vertex.

Parameters
[in]vtxis the vertex of the scene object.
Note
Calling this function will lazy create motion models.
virtual void makVrv::DtMultiDeadReckonUpdater::setUseAbsoluteTimeStamping ( bool  )
virtual

Sets whether or not to use absolute time stamping (default is false).

If true, when the update method is called the de's systemClock() will be used rather than the supplied simulation time

bool makVrv::DtMultiDeadReckonUpdater::useAbsoluteTimeStamping ( ) const
DtMotionModel* makVrv::DtMultiDeadReckonUpdater::createMotionModel ( DtMotionModel other)
private

Helper function to create and initialize a new motion model with data from a previous motion model and current updater state.

Parameters
[in]otheris the is the object to copy from.
Returns
A newly created motion model or NULL on failure.
void makVrv::DtMultiDeadReckonUpdater::applyToAllMotionModels ( const boost::function< void(DtMotionModel *)> &  func)
private

A helper function to call the same function on all the motion models.

Member Data Documentation

MotionModels makVrv::DtMultiDeadReckonUpdater::myMotionModels
protected
std::string makVrv::DtMultiDeadReckonUpdater::myMotionModelType
protected
DtDeadReckonTypes makVrv::DtMultiDeadReckonUpdater::myDeadReckonTypes
protected
float makVrv::DtMultiDeadReckonUpdater::mySmoothingPeriod
protected
bool makVrv::DtMultiDeadReckonUpdater::mySmoothingEnabled
protected
bool makVrv::DtMultiDeadReckonUpdater::myUseAbsoluteTimeStamping
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)