VR-Forces 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 Member Functions
makVrv::DtIndirectAnimatingDof Class Reference

Wrapper class for wrapping osgSim::DOFTransform animations. Allows to set a translation & translation velocity on a dof. Allows to set a HPR & HPR velocity on a dof. Smooths out the translations and HPR depending on whether smoothing is enabled or not over a 'smoothing period'. Updates the internally held osg dof based on these calculations.

Public Member Functions

 DtIndirectAnimatingDof (DtDe &de, osgSim::DOFTransform *dof)
 
virtual ~DtIndirectAnimatingDof ()
 
virtual void updateAnimation (const osg::FrameStamp *frameStamp)
 
virtual void setTranslation (const Vector3_64 &trans, const Vector3_64 &transVel)
 
virtual void setOrientation (const Vector3_64 &hpr, const Vector3_64 &hprVel)
 
virtual void setOrientation (const Vector3_64 &hprVel, bool forceUpdate)
 
virtual osgSim::DOFTransform * dof (void)
 
virtual bool hasVelocity (void) const
 
virtual void setAnimationFlags (int val)
 
virtual int animationFlags (void) const
 

Protected Member Functions

virtual bool update (unsigned int previousTraversalNumber, double newTime, double previousTime)
 
virtual void adjustDofConstraintsIfNecessary ()
 
virtual void constrainTranslationAndHprIfNecessary (void)
 
virtual bool hasHprLimits (void) const
 

Protected Attributes

const DtDemyDe
 
osg::ref_ptr
< osgSim::DOFTransform > 
myDof
 
Vector3_64 myTrans
 
Vector3_64 myTransVel
 
Vector3_64 myHpr
 
Vector3_64 myHprVel
 
float myLastUpdate
 
float mySmoothCompleteTime
 
Vector3_64 mySmoothTransVel
 
Vector3_64 mySmoothHprVel
 
bool myHasVelocity = true
 
int myAnimationFlags = 0
 

Private Member Functions

 DtIndirectAnimatingDof ()=delete
 
 DtIndirectAnimatingDof (const DtIndirectAnimatingDof &rhs)=delete
 
DtIndirectAnimatingDofoperator= (const DtIndirectAnimatingDof &rhs)=delete
 

Constructor & Destructor Documentation

makVrv::DtIndirectAnimatingDof::DtIndirectAnimatingDof ( DtDe de,
osgSim::DOFTransform *  dof 
)

ctor

virtual makVrv::DtIndirectAnimatingDof::~DtIndirectAnimatingDof ( )
virtual

dtor

makVrv::DtIndirectAnimatingDof::DtIndirectAnimatingDof ( )
privatedelete

not allowed

makVrv::DtIndirectAnimatingDof::DtIndirectAnimatingDof ( const DtIndirectAnimatingDof rhs)
privatedelete

not allowed

Member Function Documentation

DtIndirectAnimatingDof& makVrv::DtIndirectAnimatingDof::operator= ( const DtIndirectAnimatingDof rhs)
privatedelete

not allowed

virtual void makVrv::DtIndirectAnimatingDof::updateAnimation ( const osg::FrameStamp *  frameStamp)
virtual

update the internally held dof (update its transform), given a time stamp the transformed dof is smoothed or not depending on the settings

virtual void makVrv::DtIndirectAnimatingDof::setTranslation ( const Vector3_64 trans,
const Vector3_64 transVel 
)
virtual

set the translation and translation velocity on the dof

virtual void makVrv::DtIndirectAnimatingDof::setOrientation ( const Vector3_64 hpr,
const Vector3_64 hprVel 
)
virtual

set the HPR (heading, pitch and roll) and a HPR velocity on the dof

virtual void makVrv::DtIndirectAnimatingDof::setOrientation ( const Vector3_64 hprVel,
bool  forceUpdate 
)
virtual

set just the HPR velocity

virtual osgSim::DOFTransform* makVrv::DtIndirectAnimatingDof::dof ( void  )
virtual

access the internally held dof

virtual bool makVrv::DtIndirectAnimatingDof::hasVelocity ( void  ) const
virtual

has velocity

virtual void makVrv::DtIndirectAnimatingDof::setAnimationFlags ( int  val)
virtual

animation flags: only one value is used. If 1, the manager will clear this from it's list of animating dofs

virtual int makVrv::DtIndirectAnimatingDof::animationFlags ( void  ) const
virtual

animation flags: only one value is used. If 1, the manager will clear this from it's list of animating dofs

virtual bool makVrv::DtIndirectAnimatingDof::update ( unsigned int  previousTraversalNumber,
double  newTime,
double  previousTime 
)
protectedvirtual

update the translation & HPR

virtual void makVrv::DtIndirectAnimatingDof::adjustDofConstraintsIfNecessary ( )
protectedvirtual

if dof constraints are enabled globally, they are turned on, else ignored

virtual void makVrv::DtIndirectAnimatingDof::constrainTranslationAndHprIfNecessary ( void  )
protectedvirtual

if dof constraints are enabled globally, translation & hpr is constrained

virtual bool makVrv::DtIndirectAnimatingDof::hasHprLimits ( void  ) const
protectedvirtual

whether the dof has hpr limits (per dof->getLimitationFlags)

Member Data Documentation

const DtDe& makVrv::DtIndirectAnimatingDof::myDe
protected

reference to the internally held DtDe

osg::ref_ptr<osgSim::DOFTransform> makVrv::DtIndirectAnimatingDof::myDof
protected

the reference to the dof that animates

Vector3_64 makVrv::DtIndirectAnimatingDof::myTrans
protected

Current translation in meters.

Vector3_64 makVrv::DtIndirectAnimatingDof::myTransVel
protected
Vector3_64 makVrv::DtIndirectAnimatingDof::myHpr
protected

Current Heading/Pitch/Roll angles in radians.

Vector3_64 makVrv::DtIndirectAnimatingDof::myHprVel
protected

Current Heading/Pitch/Roll angular velocity in rad/s.

float makVrv::DtIndirectAnimatingDof::myLastUpdate
protected

Frame time of the most recent animation update.

float makVrv::DtIndirectAnimatingDof::mySmoothCompleteTime
protected

Frame time when smoothing is complete (if enabled). This will be the time the last update arrived from the model plus the smoothPeriod (at the time of the update)

Vector3_64 makVrv::DtIndirectAnimatingDof::mySmoothTransVel
protected

If actively smoothing, use this velocity instead for translation.

Vector3_64 makVrv::DtIndirectAnimatingDof::mySmoothHprVel
protected

If actively smoothing, use this velocity instead for rotation.

bool makVrv::DtIndirectAnimatingDof::myHasVelocity = true
protected
int makVrv::DtIndirectAnimatingDof::myAnimationFlags = 0
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)