VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types
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)
 CTOR.
virtual ~DtMultiDeadReckonUpdater ()
 Virtual DTOR.
virtual void update (DtTime tNow)
 Push the update data to the scene object.
virtual bool needsUpdate (DtTime tNow)
 The check function called by DtTickableManager to verify if an update is required.
virtual void setSceneObject (DtSceneObject *sceneObject)
 Set the scene object to be updated.
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
DtSceneObjectsceneObject ()
 Get the current scene object for this updater.
DtUniqueID uniqueId () const
 Returns the distributed object id of this updater.
virtual void setInputPosition (unsigned int vtx, const DtVector &position)
 Set the object's position with a time for absolute timestamping.
virtual void setInputPosition (unsigned int vtx, const DtVector &position, double time)
 Set the object's position with a time for absolute timestamping.
virtual void setInputOrientation (unsigned int vtx, const DtTaitBryan &ori)
 Set the object's orientation with a time specified for absolute time stampint.
virtual void setInputOrientation (unsigned int vtx, const DtTaitBryan &ori, double time)
 Set the object's orientation with a time specified for absolute time stampint.
- Public Member Functions inherited from makVrv::DtTickable
virtual ~DtTickable ()
 Virtual DTOR.
virtual void setUpdatePeriod (unsigned int period)
 Specify how often (in # of frames) this tickable should call update.
virtual unsigned int updatePeriod () const
 Specify how often (in # of frames) this tickable should call update.

Protected 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.
Slots
virtual void slot_sceneObjectToBeDeleted (const DtUniqueID &id)
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR.
 DtTickable ()
 Unimplemented default CTOR.
virtual void slot_managerAboutToBeDeleted ()

Protected Attributes

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 update()
MotionModels myMotionModels
std::string myMotionModelType
DtDeadReckonTypes myDeadReckonTypes
float mySmoothingPeriod
bool mySmoothingEnabled
bool myUseAbsoluteTimeStamping
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction.
DtSignalConnectionManager myConnections
unsigned int myFrameCounter
unsigned int myFrameToUpdate
unsigned int myUpdatePeriod

Private Types

typedef std::vector
< DtMotionModel * > 
MotionModels

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 
)

CTOR.

Parameters
[in]deis the display engine.
[in]idis a unique identifier for this distributed object. 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::DtTickable.

virtual bool makVrv::DtMultiDeadReckonUpdater::needsUpdate ( DtTime  tNow)
virtual

The check function called by DtTickableManager to verify if an update is required.

If this function returns true, the DtTickableManager will then call update().

Parameters
[in]tNowis the current time-stamp.
Return values
trueif this object needs to be ticked.
falseotherwise. This base class method uses both the time and the presence of valid input transforms to determine if the updater should be ticked.

Reimplemented from makVrv::DtTickable.

virtual void makVrv::DtMultiDeadReckonUpdater::setSceneObject ( DtSceneObject sceneObject)
virtual

Set the scene object to be updated.

Parameters
[in]sceneObjectis the scene object to receive updates.
virtual void makVrv::DtMultiDeadReckonUpdater::setInputPosition ( unsigned int  vtx,
const DtVector position 
)
virtual

Set the object's position with a time for absolute timestamping.

virtual void makVrv::DtMultiDeadReckonUpdater::setInputPosition ( unsigned int  vtx,
const DtVector position,
double  time 
)
virtual

Set the object's position with a time for absolute timestamping.

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

Set the object's orientation with a time specified for absolute time stampint.

virtual void makVrv::DtMultiDeadReckonUpdater::setInputOrientation ( unsigned int  vtx,
const DtTaitBryan &  ori,
double  time 
)
virtual

Set the object's orientation with a time specified for absolute time stampint.

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.
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.
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.
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
DtSceneObject* makVrv::DtMultiDeadReckonUpdater::sceneObject ( )
inline

Get the current scene object for this updater.

Returns
A pointer to the scene object or NULL if not set.
DtUniqueID makVrv::DtMultiDeadReckonUpdater::uniqueId ( ) const
inline

Returns the distributed object id of this updater.

DtMotionModel* makVrv::DtMultiDeadReckonUpdater::createMotionModel ( DtMotionModel other)
protected

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)
protected

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

virtual void makVrv::DtMultiDeadReckonUpdater::slot_sceneObjectToBeDeleted ( const DtUniqueID id)
protectedvirtual

Member Data Documentation

DtDe& makVrv::DtMultiDeadReckonUpdater::myDe
protected

The display engine.

DtUniqueID makVrv::DtMultiDeadReckonUpdater::myUniqueId
protected

This distributed object's unique identifier.

DtSceneObject* makVrv::DtMultiDeadReckonUpdater::mySceneObject
protected

A pointer to the current scene object being updated.

DtTime makVrv::DtMultiDeadReckonUpdater::myLastUpdateTime
protected

The last time stamp when the update()

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 Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)