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

DtDeadReckonUpdater is a scene object updater that is given kinematic updates and updates a scene object with dead reckoned values based on those updates, configuration, and current simulation time. More...

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

Public Member Functions

 DtDeadReckonUpdater (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtDeadReckonUpdater ()
 DTOR. More...
 
virtual void update (DtTime tNow)
 call updateSpacial() More...
 
virtual void setSceneObject (DtSceneObject *sceneObject)
 sets the scene object to update via the id. More...
 
virtual void setDeadReckoningSettings (bool deadReckonPosition, bool deadReckonVelocity, bool deadReckonOrientation)
 Set the object's dead reckoning settings. More...
 
virtual void setSmoothingEnabled (bool enabled)
 Turn the smoother on or off. More...
 
virtual void setSmoothingPeriod (float period)
 Set the period for the smoother. More...
 
virtual void resetSmoother ()
 Reset the smoother. Used when changing from embarked to disembarked and vice versa. More...
 
virtual void updateSpacial (DtTime tNow)
 Update the spacial attributes using the given simulation time. More...
 
void setMotionModel (const std::string &modelName)
 Set which motion model the object should use. More...
 
DtMotionModelmotionModel () const
 Get the motion model. More...
 
virtual void setUseAbsoluteTimeStamping (bool)
 Sets whether or not to use absolute time stamping (default is false). More...
 
bool useAbsoluteTimeStamping () const
 
virtual void setFrozen (bool frozen)
 Suspend / resume dead reckoning. More...
 
virtual bool isFrozen () const
 
virtual const DtVectorapproxLocation (DtTime curTime) const
 Because of time stamping, use these routines to get values from the motion model. More...
 
virtual const DtVector32 & approxVelocity (DtTime curTime) const
 Get the approximated (i.e. More...
 
virtual const DtVector32 & approxUnsmoothedVelocity (DtTime curTime) const
 Get the unsmoothed approximated (i.e. More...
 
virtual const DtTaitBryan & approxEuler (DtTime curTime) const
 Get the approximated (i.e. More...
 
virtual const DtVector32 & acceleration (DtTime curTime) const
 Get the acceleration for the specified time. More...
 
virtual const DtVector32 & rotationalVelocity (DtTime curTime) const
 Get the rotation velocity for the specified time. More...
 
virtual void setVelocity (const DtVector32 &velocity)
 Set the object's velocity. More...
 
virtual void setVelocity (const DtVector32 &velocity, double time)
 
virtual void setBodyVelocity (const DtVector32 &velocity)
 Set the object's body velocity. More...
 
virtual void setBodyVelocity (const DtVector32 &velocity, double time)
 
virtual void setAcceleration (const DtVector32 &acceleration)
 Set the object's velocity. More...
 
virtual void setAcceleration (const DtVector32 &acceleration, double time)
 
virtual void setAngularVelocity (const DtVector32 &angularVelocity)
 Set the object's rotational velocity. More...
 
virtual void setAngularVelocity (const DtVector32 &angularVelocity, double time)
 
virtual void setInputPosition (const DtVector &position)
 Set the object's position with a time for absolute timestamping. More...
 
virtual void setInputPosition (const DtVector &position, double time)
 
virtual void setInputOrientation (const DtTaitBryan &ori)
 Set the object's orientation with a time specified for absolute time stampint. More...
 
virtual void setInputOrientation (const DtTaitBryan &ori, double time)
 
- Public Member Functions inherited from makVrv::DtSceneObjectUpdater
 DtSceneObjectUpdater (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtSceneObjectUpdater ()
 Virtual DTOR. More...
 
virtual void setNextUpdater (DtSceneObjectUpdater *nextUpdater)
 Set the next updater in the updater chain. More...
 
virtual void setPrevUpdater (DtSceneObjectUpdater *prevUpdater)
 Set the previous updater in the updater chain. More...
 
virtual bool needsUpdate (DtTime tNow)
 The check function called by DtTickableManager to verify if an update is required. More...
 
virtual void updateAdaptiveTickrate (const DtVector &lastPos, const DtTime &deltaTime)
 This is called by the update function after all the original chaining updates happen. More...
 
virtual void setVertexToUpdate (unsigned int vertex)
 Specify which vertex in the scene object this updater updates. More...
 
virtual void setOutputPosition (const DtVector &position)
 Output the resultant position. More...
 
virtual void setOutputOrientation (const DtTaitBryan &orientation)
 Output the resultant orientation. More...
 
virtual void setOutputPositionAndOrientation (const DtVector &position, const DtTaitBryan &orientation)
 Set both the position and orientation at the same time. More...
 
virtual DtTime lastUpdateTime () const
 Get the time-stamp of the last update. More...
 
virtual void setSceneObject (DtSceneObject *sceneObject, bool addToTickableMgrIfHead)
 Set the scene object to be updated. More...
 
virtual void setLodSystemEnabled (bool enabled)
 brief set if the lod update system is on for this model More...
 
virtual bool lodSystemEnabled () const
 brief gets if the lod update system is on for this model More...
 
virtual void setLodScaleSpeedFactor (float factor)
 brief sets the value that linearly adjusts the range of the lod radii by the velocity More...
 
virtual float lodScaleSpeedFactor () const
 brief gets the value that linearly adjusts the range of the lod radii by the velocity More...
 
virtual void setLodRadiusStart (float ratius)
 brief sets the near radius where the update rate starts to fall off More...
 
virtual float lodRadiusStart () const
 brief gets the near radius where the update rate starts to fall off More...
 
virtual void setLodRadiusEnd (float ratius)
 brief sets the far radius where the update rate stops falling off More...
 
virtual float lodRadiusEnd () const
 brief gets the far radius where the update rate stops falling off More...
 
virtual void setNearLodUpdateRate (int nearRate)
 sets the update rate at the near radius, defaults to every six ticks More...
 
virtual int nearLodUpdateRate () const
 brief gets the update rate at the near radius, defaults to every six ticks More...
 
virtual void setFarLodUpdateRate (int maxRate)
 brief the update rate at the far radius, defaults to every 30 ticks More...
 
virtual int farLodUpdateRate () const
 brief gets the update rate at the far radius defaults to every 30 ticks More...
 
DtUniqueID uniqueId () const
 Returns the distributed object id of this updater. More...
 
DtSceneObjectUpdaterfindNextUpdater () const
 Return the next updater in the updater chain. More...
 
DtSceneObjectUpdaterfindPrevUpdater () const
 Return the previous updater in the updater chain. More...
 
virtual bool isChainThreadSafe (DtSceneObjectUpdater *firstUpdater)
 Check all the updaters in the current chain and determine if the chain is thread safe. More...
 
virtual DtSceneObjectUpdaterchainHead ()
 Find the first updater in the chain. More...
 
virtual void setIsThreadSafe (bool safe)
 Override the DtTickable base class' method so retest the entire chain this updater belongs to. More...
 
DtSceneObjectfindSceneObject ()
 Get the current scene object for this updater. More...
 
DtSceneObject *const findSceneObject () const
 const correct version More...
 
- Public Member Functions inherited from makVrv::DtTickable
virtual bool updateIfNeeded (DtTime tNow)
 Calls needsUpdate(), and then calls update() if needsUpdate() is true. More...
 
virtual ~DtTickable ()
 Virtual DTOR. More...
 
virtual bool isThreadSafe () const
 
virtual void setTickableListState (TickableListState safeList)
 Track which tickable list (if any) this tickable is on Since the tickable constructor puts ALL tickables on the main (unThreadSafe) to start we need a way to check which list a tickable is on (and this way we can request removals from the correct list instead of having to call DtTickableManager::removeTickableObject(), which tries both lists). More...
 
virtual TickableListState tickableListState () const
 
virtual void setUpdatePeriod (unsigned int period)
 Specify how often (in # of frames) this tickable should call update. More...
 
virtual unsigned int updatePeriod () const
 

Protected Attributes

DtMotionModelmyMotionModel
 
std::string myMotionModelType
 
unsigned int myDeadReckoningSetting
 
float mySmoothingPeriod
 
bool mySmoothingEnabled
 
bool myUseAbsoluteTimeStamping
 
DtVector32 myLastVelocity
 
DtVector32 myLastBodyVelocity
 
DtVector32 myLastAcceleration
 
DtVector32 myLastAngularVelocity
 
DtVector myLastPosition
 
DtTaitBryan myLastOrientation
 
bool myUsesBodyVelocity
 
bool myNeedsBodyVelocityUpdate
 
boost::signalslib::connection myModelAddedConnection
 
boost::signalslib::connection myModelRemovedConnection
 
- Protected Attributes inherited from makVrv::DtSceneObjectUpdater
DtDemyDe
 The display engine. More...
 
DtUniqueID myUniqueId
 This distributed object's unique identifier. More...
 
DtSceneObjectmySceneObject
 A pointer to the current scene object being updated. More...
 
int myModelSet
 This updater is registered as a modelset-specific tickable; this is the modelset it's registered with. More...
 
boost::signalslib::connection mySceneObjectConnection
 
DtSceneObjectUpdatermyNextUpdater
 The next updater in the chain (or NULL) More...
 
DtSceneObjectUpdatermyPrevUpdater
 The previous updater in the chain (or NULL) More...
 
unsigned int myVertexToUpdate
 The default scene object vertex to update. More...
 
DtVector myInputPosition
 Input position. More...
 
DtTaitBryan myInputOrientation
 Input Orientation. More...
 
bool myPositionDataOutputted
 Flag to indicate if setOutputPosition has been called this tick. More...
 
bool myOrientationDataOutputted
 Flag to indicate if setOutputOrientation has been called this tick. More...
 
UpdateLODParams myLodUpdateParams
 automatic lod system params More...
 
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction. More...
 
DtSignalConnectionManager myConnections
 
unsigned int myFrameCounter
 
unsigned int myFrameToUpdate
 
unsigned int myUpdatePeriod
 
DtTime myLastUpdateTime
 
bool myIsThreadSafe
 
TickableListState myTickableListState
 

Additional Inherited Members

- Public Types inherited from makVrv::DtTickable
enum  TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList }
 Enumeration used to indicate which DtTickableManager's tickable list the tickable is on, if any. More...
 
- Public Attributes inherited from makVrv::DtSceneObjectUpdater
boost::signalslib::signal
< void(const DtUniqueID &) > 
signal_updaterToBeDeleted
 
- Protected Member Functions inherited from makVrv::DtSceneObjectUpdater
virtual void removeThreadSafeChainFromManager (DtSceneObjectUpdater *head)
 Helper method to remove an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) from the DtTickableManager's thread-safe tickable list. More...
 
virtual void removeUnThreadSafeChainFromManager (DtSceneObjectUpdater *head)
 Helper method to remove an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) from the DtTickableManager's un-thread-safe tickable list. More...
 
virtual void addThreadSafeChainToManager (DtSceneObjectUpdater *head)
 Helper method to add an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) to the DtTickableManager's thread-safe tickable list. More...
 
virtual void addUnThreadSafeChainToManager (DtSceneObjectUpdater *head)
 Helper method to add an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) to the DtTickableManager's un-thread-safe tickable list. More...
 
virtual void placeChainOnCorrectTickableList (DtSceneObjectUpdater *head)
 Examines the chain for the given head updater, removes the head from the approriate ticable list if necessary, and then adds the head to the correct (threaded or unthreaded) tickable list. More...
 
virtual void slot_sceneObjectToBeDeleted (const DtUniqueID &id)
 
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR. More...
 
 DtTickable ()
 Unimplemented default CTOR. More...
 
virtual void slot_managerAboutToBeDeleted ()
 

Detailed Description

DtDeadReckonUpdater is a scene object updater that is given kinematic updates and updates a scene object with dead reckoned values based on those updates, configuration, and current simulation time.

Constructor & Destructor Documentation

makVrv::DtDeadReckonUpdater::DtDeadReckonUpdater ( DtDe de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtDeadReckonUpdater::~DtDeadReckonUpdater ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtDeadReckonUpdater::update ( DtTime  tNow)
virtual
virtual void makVrv::DtDeadReckonUpdater::setSceneObject ( DtSceneObject sceneObject)
virtual

sets the scene object to update via the id.

This override called the base implementation as well as ensuring the current motion model is updating the current models on the scene object.

Reimplemented from makVrv::DtSceneObjectUpdater.

virtual void makVrv::DtDeadReckonUpdater::setVelocity ( const DtVector32 &  velocity)
virtual

Set the object's velocity.

virtual void makVrv::DtDeadReckonUpdater::setVelocity ( const DtVector32 &  velocity,
double  time 
)
virtual
virtual void makVrv::DtDeadReckonUpdater::setBodyVelocity ( const DtVector32 &  velocity)
virtual

Set the object's body velocity.

virtual void makVrv::DtDeadReckonUpdater::setBodyVelocity ( const DtVector32 &  velocity,
double  time 
)
virtual
virtual void makVrv::DtDeadReckonUpdater::setAcceleration ( const DtVector32 &  acceleration)
virtual

Set the object's velocity.

virtual void makVrv::DtDeadReckonUpdater::setAcceleration ( const DtVector32 &  acceleration,
double  time 
)
virtual
virtual void makVrv::DtDeadReckonUpdater::setAngularVelocity ( const DtVector32 &  angularVelocity)
virtual

Set the object's rotational velocity.

virtual void makVrv::DtDeadReckonUpdater::setAngularVelocity ( const DtVector32 &  angularVelocity,
double  time 
)
virtual
virtual void makVrv::DtDeadReckonUpdater::setInputPosition ( const DtVector position)
virtual

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

Reimplemented from makVrv::DtSceneObjectUpdater.

virtual void makVrv::DtDeadReckonUpdater::setInputPosition ( const DtVector position,
double  time 
)
virtual
virtual void makVrv::DtDeadReckonUpdater::setInputOrientation ( const DtTaitBryan &  ori)
virtual

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

Reimplemented from makVrv::DtSceneObjectUpdater.

virtual void makVrv::DtDeadReckonUpdater::setInputOrientation ( const DtTaitBryan &  ori,
double  time 
)
virtual
virtual void makVrv::DtDeadReckonUpdater::setDeadReckoningSettings ( bool  deadReckonPosition,
bool  deadReckonVelocity,
bool  deadReckonOrientation 
)
virtual

Set the object's dead reckoning settings.

virtual void makVrv::DtDeadReckonUpdater::setSmoothingEnabled ( bool  enabled)
virtual

Turn the smoother on or off.

virtual void makVrv::DtDeadReckonUpdater::setSmoothingPeriod ( float  period)
virtual

Set the period for the smoother.

virtual void makVrv::DtDeadReckonUpdater::resetSmoother ( )
virtual

Reset the smoother. Used when changing from embarked to disembarked and vice versa.

virtual void makVrv::DtDeadReckonUpdater::updateSpacial ( DtTime  tNow)
virtual

Update the spacial attributes using the given simulation time.

void makVrv::DtDeadReckonUpdater::setMotionModel ( const std::string &  modelName)

Set which motion model the object should use.

DtMotionModel* makVrv::DtDeadReckonUpdater::motionModel ( ) const

Get the motion model.

virtual void makVrv::DtDeadReckonUpdater::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::DtDeadReckonUpdater::useAbsoluteTimeStamping ( ) const
virtual void makVrv::DtDeadReckonUpdater::setFrozen ( bool  frozen)
virtual

Suspend / resume dead reckoning.

virtual bool makVrv::DtDeadReckonUpdater::isFrozen ( ) const
virtual
virtual const DtVector& makVrv::DtDeadReckonUpdater::approxLocation ( DtTime  curTime) const
virtual

Because of time stamping, use these routines to get values from the motion model.

Do not go to the motion model itself Get the approximated (i.e. dead-reckoned for base DtDeadReckoner) location at the specified time.

virtual const DtVector32& makVrv::DtDeadReckonUpdater::approxVelocity ( DtTime  curTime) const
virtual

Get the approximated (i.e.

dead-reckoned for base DtDeadReckoner) velocity at the specified time. Note that the 'smoothed' velocity is a misnomer - this velocity has really been potentially 'de-smoothed' to provide a smoothed location when used to do smoothing

virtual const DtVector32& makVrv::DtDeadReckonUpdater::approxUnsmoothedVelocity ( DtTime  curTime) const
virtual

Get the unsmoothed approximated (i.e.

dead-reckoned for base DtDeadReckoner) velocity at the specified time.

virtual const DtTaitBryan& makVrv::DtDeadReckonUpdater::approxEuler ( DtTime  curTime) const
virtual

Get the approximated (i.e.

dead-reckoned for base DtDeadReckoner) orientation at the specified time.

virtual const DtVector32& makVrv::DtDeadReckonUpdater::acceleration ( DtTime  curTime) const
virtual

Get the acceleration for the specified time.

virtual const DtVector32& makVrv::DtDeadReckonUpdater::rotationalVelocity ( DtTime  curTime) const
virtual

Get the rotation velocity for the specified time.

Member Data Documentation

DtMotionModel* makVrv::DtDeadReckonUpdater::myMotionModel
protected
std::string makVrv::DtDeadReckonUpdater::myMotionModelType
protected
unsigned int makVrv::DtDeadReckonUpdater::myDeadReckoningSetting
protected
float makVrv::DtDeadReckonUpdater::mySmoothingPeriod
protected
bool makVrv::DtDeadReckonUpdater::mySmoothingEnabled
protected
bool makVrv::DtDeadReckonUpdater::myUseAbsoluteTimeStamping
protected
DtVector32 makVrv::DtDeadReckonUpdater::myLastVelocity
protected
DtVector32 makVrv::DtDeadReckonUpdater::myLastBodyVelocity
protected
DtVector32 makVrv::DtDeadReckonUpdater::myLastAcceleration
protected
DtVector32 makVrv::DtDeadReckonUpdater::myLastAngularVelocity
protected
DtVector makVrv::DtDeadReckonUpdater::myLastPosition
protected
DtTaitBryan makVrv::DtDeadReckonUpdater::myLastOrientation
protected
bool makVrv::DtDeadReckonUpdater::myUsesBodyVelocity
protected
bool makVrv::DtDeadReckonUpdater::myNeedsBodyVelocityUpdate
protected
boost::signalslib::connection makVrv::DtDeadReckonUpdater::myModelAddedConnection
protected
boost::signalslib::connection makVrv::DtDeadReckonUpdater::myModelRemovedConnection
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)