VR-Forces 4.1 Class Documentation
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtAttachableUpdater Class Reference

A DtAttachableUpdater updates a scene an object that can be positioned in the scene by (possibly) attaching it to another object. More...

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

Classes

class  AttachedPoint
 Common base class for all attachments. More...
class  LinearAttachedPoint
 AttachPoint used to attach to a point that is proportionally positioned between 2 other points. More...
class  ObjectAttachedPoint
 AttachedPoint used to attach to a scene object. More...
class  VertexAttachedPoint
 AttachPoint used to attach to a position provided through the updater interface. More...

Public Types

enum  AttachedPointType {
  AttachedPointTypeVertex, AttachedPointTypeObject, AttachedPointTypeProportional, AttachedPointTypeDeprecatedObject,
  AttachedPointTypeInvalidObject
}
 Types of attachments. More...
enum  AttachedPointMode { AttachedPointModePositionAndOrientation, AttachedPointModePositionOnly, AttachedPointModeOrientationOnly }

Public Member Functions

 DtAttachableUpdater (DtDe &de, DtUniqueID id, bool suppressTick=false)
 CTOR.
virtual ~DtAttachableUpdater ()
 DTOR.
virtual void addAttachedPoint (const DtVector &position, int targetVertexIndex)
 Add a (vertex) attach point.
virtual void addAttachedPoint (DtUniqueID uniqueID, int targetVertexIndex)
 Add a (object) attach point.
virtual void addAttachedPoint (DtUniqueID uniqueID, int vtx1, int vtx2, double proportion, int targetVertexIndex)
 Add a (linear) attach point.
virtual const AttachedPointattachedPoint (int targetVertexIndex) const
 Returns the attached point at the given vertex.
virtual void setPositionOffset (const DtVector &offset)
 positionally offset the attach points by this amount.
virtual void setPositionOffset (const DtVector &offset, int vtx)
 positionally offset the specific attach point by this amount.
virtual void setOrientationOffset (const DtTaitBryan &offset)
 rotationally offset the attach points by this amount.
virtual void setAttachedPointMode (unsigned int mode, int vtx)
 Set whether an attached point updates position, orientation, or both.
virtual void update (DtTime tNow)
 Calls doAttachment() followed by updateSceneObject()
virtual void doAttachment (DtTime tNow)
 Find the actual position and orientation based on the attach points and offsets.
- 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 Types

typedef std::vector
< AttachedPoint * > 
AttachedPointsVector

Protected Member Functions

virtual void slot_attachedSceneObjectToBeDeleted (const DtUniqueID &)
virtual void slot_attachedUpdaterToBeDeleted (const DtUniqueID &id)
virtual bool pointLocationAndOrientation (AttachedPoint *point, double simTime, DtVector &location, DtTaitBryan &orientation)
virtual void removeAttachedPoint (int vtx, DtVector *positionOffset=0)
 Returns current position offset in supplied pointer.
- Protected Member Functions inherited from makVrv::DtSceneObjectUpdater
virtual void slot_sceneObjectToBeDeleted (const DtUniqueID &id)
 Signal that this updater is being destroyed.

Protected Attributes

AttachedPointsVector myAttachedPoints
DtVector myPositionOffset
DtTaitBryan myOrientationOffset
- 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.

Additional Inherited Members

- Public Attributes inherited from makVrv::DtSceneObjectUpdater
boost::signal< void(const
DtUniqueID &) > 
signal_updaterToBeDeleted
 Signal that this updater is being destroyed.

Detailed Description

A DtAttachableUpdater updates a scene an object that can be positioned in the scene by (possibly) attaching it to another object.

Member Typedef Documentation

Member Enumeration Documentation

Types of attachments.

Enumerator:
AttachedPointTypeVertex 
AttachedPointTypeObject 
AttachedPointTypeProportional 
AttachedPointTypeDeprecatedObject 
AttachedPointTypeInvalidObject 
Enumerator:
AttachedPointModePositionAndOrientation 
AttachedPointModePositionOnly 
AttachedPointModeOrientationOnly 

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtAttachableUpdater::~DtAttachableUpdater ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtAttachableUpdater::addAttachedPoint ( const DtVector position,
int  targetVertexIndex 
)
virtual

Add a (vertex) attach point.

If multiple attach points are specified each will update its corresponding vertex in the scene object being updated

virtual void makVrv::DtAttachableUpdater::addAttachedPoint ( DtUniqueID  uniqueID,
int  targetVertexIndex 
)
virtual

Add a (object) attach point.

If multiple attach points are specified each will update its corresponding vertex in the scene object being updated

virtual void makVrv::DtAttachableUpdater::addAttachedPoint ( DtUniqueID  uniqueID,
int  vtx1,
int  vtx2,
double  proportion,
int  targetVertexIndex 
)
virtual

Add a (linear) attach point.

If multiple attach points are specified each will update its corresponding vertex in the scene object being updated

virtual const AttachedPoint& makVrv::DtAttachableUpdater::attachedPoint ( int  targetVertexIndex) const
virtual

Returns the attached point at the given vertex.

This method returns a copy of the current state of the attached point. If an attached point with the given index could not be found, this method returns an AttachedPoint with type AttachedPointTypeInvalidObject.

virtual void makVrv::DtAttachableUpdater::setPositionOffset ( const DtVector offset)
virtual

positionally offset the attach points by this amount.

This is in the coordinate system of the object attached to

virtual void makVrv::DtAttachableUpdater::setPositionOffset ( const DtVector offset,
int  vtx 
)
virtual

positionally offset the specific attach point by this amount.

This is in the coordinate system of the object attached to. Will be used in conjunction with the overall position offset

virtual void makVrv::DtAttachableUpdater::setOrientationOffset ( const DtTaitBryan &  offset)
virtual

rotationally offset the attach points by this amount.

This is in the coordinate system of the object attached to

virtual void makVrv::DtAttachableUpdater::setAttachedPointMode ( unsigned int  mode,
int  vtx 
)
virtual

Set whether an attached point updates position, orientation, or both.

virtual void makVrv::DtAttachableUpdater::update ( DtTime  tNow)
virtual
virtual void makVrv::DtAttachableUpdater::doAttachment ( DtTime  tNow)
virtual

Find the actual position and orientation based on the attach points and offsets.

virtual void makVrv::DtAttachableUpdater::slot_attachedSceneObjectToBeDeleted ( const DtUniqueID )
protectedvirtual
virtual void makVrv::DtAttachableUpdater::slot_attachedUpdaterToBeDeleted ( const DtUniqueID id)
protectedvirtual
virtual bool makVrv::DtAttachableUpdater::pointLocationAndOrientation ( AttachedPoint point,
double  simTime,
DtVector location,
DtTaitBryan &  orientation 
)
protectedvirtual
virtual void makVrv::DtAttachableUpdater::removeAttachedPoint ( int  vtx,
DtVector positionOffset = 0 
)
protectedvirtual

Returns current position offset in supplied pointer.

Member Data Documentation

AttachedPointsVector makVrv::DtAttachableUpdater::myAttachedPoints
protected
DtVector makVrv::DtAttachableUpdater::myPositionOffset
protected
DtTaitBryan makVrv::DtAttachableUpdater::myOrientationOffset
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)