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 Attributes
makVrv::DtSceneObjectUpdater Class Reference

Scene Object Updater. More...

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

Public Member Functions

 DtSceneObjectUpdater (DtDe &de, DtUniqueID id)
 CTOR.
virtual ~DtSceneObjectUpdater ()
 Virtual DTOR.
virtual void setNextUpdater (DtSceneObjectUpdater *nextUpdater)
 Set the next updater in the updater chain.
virtual void setPrevUpdater (DtSceneObjectUpdater *prevUpdater)
 Set the previous updater in the updater chain.
virtual bool needsUpdate (DtTime tNow)
 The check function called by DtTickableManager to verify if an update is required.
virtual void update (DtTime tNow)
 The update function called by DtTickableManager during update-ticks.
virtual void setVertexToUpdate (unsigned int vertex)
 Specify which vertex in the scene object this updater updates.
virtual void setInputPosition (const DtVector &position)
 Set the position input to this updater.
virtual void setInputOrientation (const DtTaitBryan &orientation)
 Set the orientation input to this updater.
virtual void setOutputPosition (const DtVector &position)
 Output the resultant position.
virtual void setOutputOrientation (const DtTaitBryan &orientation)
 Output the resultant orientation.
virtual DtTime lastUpdateTime () const
 Get the time-stamp of the last update.
virtual void setSceneObject (DtSceneObject *sceneObject)
 Set the scene object to be updated.
DtUniqueID uniqueId () const
 Returns the distributed object id of this updater.
DtSceneObjectUpdaterfindNextUpdater () const
 Return the next updater in the updater chain.
DtSceneObjectUpdaterfindPrevUpdater () const
 Return the previous updater in the updater chain.
DtSceneObjectfindSceneObject ()
 Get the current scene object for this updater.
DtSceneObject *const findSceneObject () const
 const correct version
- 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

Public Attributes

Signals

Signal that this updater is being destroyed

boost::signal< void(const
DtUniqueID &) > 
signal_updaterToBeDeleted

Protected Member Functions

Slots

Slot called when the a scene object is to be deleted.

If its the scene object that this updater is updating, then the local scene object copy is set to false

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.
boost::signalslib::connection mySceneObjectConnection
DtTime myLastUpdateTime
 The last time stamp when the update()
DtSceneObjectUpdatermyNextUpdater
 The next updater in the chain (or NULL)
DtSceneObjectUpdatermyPrevUpdater
 The previous updater in the chain (or NULL)
unsigned int myVertexToUpdate
 The default scene object vertex to update.
DtVector myInputPosition
 Input position.
DtTaitBryan myInputOrientation
 Input Orientation.
bool myPositionDataOutputted
 Flag to indicate if setOutputPosition has been called this tick.
bool myOrientationDataOutputted
 Flag to indicate if setOutputOrientation has been called this tick.
- 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

Detailed Description

Scene Object Updater.

DtSceneObjectUpdater is a distributed object managed by DtTickableManager. It provides an API and infrastructure used by deriving objects to update the position and orientation of scene objects in render space. DtSceneObjectUpdaters may be chained together in a list to perform multiple position and/or orientation transformations. For example, one updater might dead reckon position and orientation based on kinematic info, the next in the chain could ground clamp the object. A third might adjust the ground clamped position to support terrain scaling.

Constructor & Destructor Documentation

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

CTOR.

Parameters
[in]deis the display engine.
[in]idis a unique identifier for this distributed object.
virtual makVrv::DtSceneObjectUpdater::~DtSceneObjectUpdater ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual void makVrv::DtSceneObjectUpdater::setNextUpdater ( DtSceneObjectUpdater nextUpdater)
virtual

Set the next updater in the updater chain.

Parameters
[in]nextUpdateris the next updater in this updater chain When the next updater is null, it indicates that the updater is at the end of the chain. Its output will be used to set the appropriate vertex (set using setVertexToUpdate) in the scene object. Updaters with a non-null next updater will provide its outputs to the inputs of the next updater.

Reimplemented in makVrv::DtSurfaceClampingUpdater.

virtual void makVrv::DtSceneObjectUpdater::setPrevUpdater ( DtSceneObjectUpdater prevUpdater)
virtual

Set the previous updater in the updater chain.

Parameters
[in]prevUpdateris the prev updater in this updater chain When the previous updater is null, it indicates that this is the start of the updater chain; intial position and information is provided using setInputPosition and setInputOrientation.
virtual bool makVrv::DtSceneObjectUpdater::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::DtSceneObjectUpdater::update ( DtTime  tNow)
virtual

The update function called by DtTickableManager during update-ticks.

Parameters
[in]tNowis the current time-stamp.
Note
All classes deriving from DtSceneObjectUpdater must call DtSceneObjectUpdater::update() AFTER their own update completes for chaining (and pass-thru) to work correctly.

Implements makVrv::DtTickable.

Reimplemented in makVrv::DtEmbarkationUpdater, makVrv::DtMultiPointEmbarkationUpdater, makVrv::DtSurfaceClampingUpdater, makVrv::DtVertexUpdater, makVrv::DtMultiPointSceneObjectUpdater, makVrv::DtGroundClampingUpdater, makVrv::DtWaterClampingUpdater, makVrv::DtDeadReckonUpdater, and makVrv::DtTerrainScalingUpdater.

virtual void makVrv::DtSceneObjectUpdater::setVertexToUpdate ( unsigned int  vertex)
virtual

Specify which vertex in the scene object this updater updates.

Parameters
[in]vertexis the vertex in the scene object to update.

Reimplemented in makVrv::DtSurfaceClampingUpdater.

virtual void makVrv::DtSceneObjectUpdater::setInputPosition ( const DtVector position)
virtual

Set the position input to this updater.

Parameters
[in]positionis the position to use.

Reimplemented in makVrv::DtSurfaceClampingUpdater, and makVrv::DtDeadReckonUpdater.

virtual void makVrv::DtSceneObjectUpdater::setInputOrientation ( const DtTaitBryan &  orientation)
virtual

Set the orientation input to this updater.

Parameters
[in]orientationis the orientation to use.

Reimplemented in makVrv::DtDeadReckonUpdater, and makVrv::DtSurfaceClampingUpdater.

virtual void makVrv::DtSceneObjectUpdater::setOutputPosition ( const DtVector position)
virtual

Output the resultant position.

If there is a next updater, this will call that updater's setInputPosition with the result. Otherwise the result will be provided to the specified scene object

Parameters
[in]positionis the position to set.

Reimplemented in makVrv::DtBoxUpdater.

virtual void makVrv::DtSceneObjectUpdater::setOutputOrientation ( const DtTaitBryan &  orientation)
virtual

Output the resultant orientation.

If there is a next updater, this will call that updater's setInputOrientaiton with the result. Otherwise the result will be provided to the specified scene object

Parameters
[in]orientationis the orientation to set.
virtual DtTime makVrv::DtSceneObjectUpdater::lastUpdateTime ( ) const
virtual

Get the time-stamp of the last update.

Returns
The last update time.
virtual void makVrv::DtSceneObjectUpdater::setSceneObject ( DtSceneObject sceneObject)
virtual

Set the scene object to be updated.

Parameters
[in]sceneObjectis the scene object to receive updates.

Reimplemented in makVrv::DtSurfaceClampingUpdater, and makVrv::DtDeadReckonUpdater.

DtSceneObject* makVrv::DtSceneObjectUpdater::findSceneObject ( )
inline

Get the current scene object for this updater.

Returns
A pointer to the scene object or NULL if not set.
DtSceneObject* const makVrv::DtSceneObjectUpdater::findSceneObject ( ) const
inline

const correct version

DtUniqueID makVrv::DtSceneObjectUpdater::uniqueId ( ) const
inline

Returns the distributed object id of this updater.

DtSceneObjectUpdater* makVrv::DtSceneObjectUpdater::findNextUpdater ( ) const
inline

Return the next updater in the updater chain.

DtSceneObjectUpdater* makVrv::DtSceneObjectUpdater::findPrevUpdater ( ) const
inline

Return the previous updater in the updater chain.

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

Member Data Documentation

boost::signal< void ( const DtUniqueID& ) > makVrv::DtSceneObjectUpdater::signal_updaterToBeDeleted
DtDe& makVrv::DtSceneObjectUpdater::myDe
protected

The display engine.

DtUniqueID makVrv::DtSceneObjectUpdater::myUniqueId
protected

This distributed object's unique identifier.

DtSceneObject* makVrv::DtSceneObjectUpdater::mySceneObject
protected

A pointer to the current scene object being updated.

boost::signalslib::connection makVrv::DtSceneObjectUpdater::mySceneObjectConnection
protected
DtTime makVrv::DtSceneObjectUpdater::myLastUpdateTime
protected

The last time stamp when the update()

DtSceneObjectUpdater* makVrv::DtSceneObjectUpdater::myNextUpdater
protected

The next updater in the chain (or NULL)

DtSceneObjectUpdater* makVrv::DtSceneObjectUpdater::myPrevUpdater
protected

The previous updater in the chain (or NULL)

unsigned int makVrv::DtSceneObjectUpdater::myVertexToUpdate
protected

The default scene object vertex to update.

DtVector makVrv::DtSceneObjectUpdater::myInputPosition
protected

Input position.

DtTaitBryan makVrv::DtSceneObjectUpdater::myInputOrientation
protected

Input Orientation.

bool makVrv::DtSceneObjectUpdater::myPositionDataOutputted
protected

Flag to indicate if setOutputPosition has been called this tick.

If a deriving updater hasn't called setOutputPosition, this base class will copy the input position to the output.

bool makVrv::DtSceneObjectUpdater::myOrientationDataOutputted
protected

Flag to indicate if setOutputOrientation has been called this tick.

If a deriving updater hasn't called setOutputPosition, this base class will copy the input orientation to the output.


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)