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 | 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.

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

Public Member Functions

 DtMultiDeadReckonUpdater (DtDe &de, DtUniqueID id)
 
virtual ~DtMultiDeadReckonUpdater ()
 
virtual void update (DtTime tNow)
 
virtual bool needsUpdate (DtTime tNow)
 
virtual void setSceneObject (DtSceneObject *sceneObject)
 
virtual void setVelocity (int vtx, const DtVector32 &velo)
 
virtual void setAcceleration (int vtx, const DtVector32 &accel)
 
virtual void setAngularVelocity (int vtx, const DtVector32 &velo)
 
virtual void setDeadReckoningSettings (bool pos, bool ori, bool velo)
 
virtual void setSmoothingEnabled (bool enabled)
 
virtual void setSmoothingPeriod (float period)
 
virtual void updateSpacial (DtTime tNow)
 
virtual void setMotionModel (const std::string &modelName)
 
virtual DtMotionModelmotionModel (int vtx)
 
virtual void setUseAbsoluteTimeStamping (bool)
 
bool useAbsoluteTimeStamping () const
 
DtSceneObjectsceneObject ()
 
DtUniqueID uniqueId () const
 
virtual void setInputPosition (unsigned int vtx, const DtVector &position)
 
virtual void setInputPosition (unsigned int vtx, const DtVector &position, double time)
 
virtual void setInputOrientation (unsigned int vtx, const DtTaitBryan &ori)
 
virtual void setInputOrientation (unsigned int vtx, const DtTaitBryan &ori, double time)
 
- Public Member Functions inherited from makVrv::DtTickable
virtual bool updateIfNeeded (DtTime tNow)
 
virtual ~DtTickable ()
 
virtual void setIsThreadSafe (bool safe)
 
virtual bool isThreadSafe () const
 
virtual void setTickableListState (TickableListState safeList)
 
virtual TickableListState tickableListState () const
 
virtual void setUpdatePeriod (unsigned int period)
 
virtual unsigned int updatePeriod () const
 
virtual bool lodSystemEnabled () const
 

Protected Member Functions

DtMotionModelcreateMotionModel (DtMotionModel *other)
 
void applyToAllMotionModels (const boost::function< void(DtMotionModel *)> &func)
 
Slots
virtual void slot_sceneObjectToBeDeleted (const DtUniqueID &id)
 
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 
 DtTickable ()
 
virtual void slot_managerAboutToBeDeleted ()
 

Protected Attributes

DtDemyDe
 
DtUniqueID myUniqueId
 
DtSceneObjectmySceneObject
 
boost::signalslib::connection mySceneObjectConnection
 
DtTime myLastUpdateTime
 
MotionModels myMotionModels
 
std::string myMotionModelType
 
DtDeadReckonTypes myDeadReckonTypes
 
float mySmoothingPeriod
 
bool mySmoothingEnabled
 
bool myUseAbsoluteTimeStamping
 
bool myHasReceivedInput
 
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 
DtSignalConnectionManager myConnections
 
unsigned int myFrameCounter
 
unsigned int myFrameToUpdate
 
unsigned int myUpdatePeriod
 
DtTime myLastUpdateTime
 
bool myIsThreadSafe
 
TickableListState myTickableListState
 

Private Types

typedef std::vector
< DtMotionModel * > 
MotionModels
 

Additional Inherited Members

- Public Types inherited from makVrv::DtTickable
enum  TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList }
 

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 DtVector32 &  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 DtVector32 &  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 DtVector32 &  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.

boost::signalslib::connection makVrv::DtMultiDeadReckonUpdater::mySceneObjectConnection
protected
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
bool makVrv::DtMultiDeadReckonUpdater::myHasReceivedInput
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)