openscenegraph
osgSim::DOFTransform Class Reference

#include <DOFTransform>

Inheritance diagram for osgSim::DOFTransform:
osg::Transform osg::Group osg::Node osg::Object osg::Referenced

Public Types

enum  MultOrder {
  PRH , PHR , HPR , HRP ,
  RPH , RHP
}
Public Types inherited from osg::Transform
enum  ReferenceFrame { RELATIVE_RF , ABSOLUTE_RF , ABSOLUTE_RF_INHERIT_VIEWPOINT }
Public Types inherited from osg::Node
typedef std::vector< Group * > ParentList
typedef unsigned int NodeMask
typedef std::vector< std::string > DescriptionList
Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }

Public Member Functions

 DOFTransform ()
 DOFTransform (const DOFTransform &dof, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Node (osgSim, DOFTransform)
virtual void traverse (osg::NodeVisitor &nv)
void setMinHPR (const osg::Vec3 &hpr)
const osg::Vec3getMinHPR () const
void setMaxHPR (const osg::Vec3 &hpr)
const osg::Vec3getMaxHPR () const
void setIncrementHPR (const osg::Vec3 &hpr)
const osg::Vec3getIncrementHPR () const
void setCurrentHPR (const osg::Vec3 &hpr)
const osg::Vec3getCurrentHPR () const
void updateCurrentHPR (const osg::Vec3 &hpr)
void setMinTranslate (const osg::Vec3 &translate)
const osg::Vec3getMinTranslate () const
void setMaxTranslate (const osg::Vec3 &translate)
const osg::Vec3getMaxTranslate () const
void setIncrementTranslate (const osg::Vec3 &translate)
const osg::Vec3getIncrementTranslate () const
void setCurrentTranslate (const osg::Vec3 &translate)
const osg::Vec3getCurrentTranslate () const
void updateCurrentTranslate (const osg::Vec3 &translate)
void setMinScale (const osg::Vec3 &scale)
const osg::Vec3getMinScale () const
void setMaxScale (const osg::Vec3 &scale)
const osg::Vec3getMaxScale () const
void setIncrementScale (const osg::Vec3 &scale)
const osg::Vec3getIncrementScale () const
void setCurrentScale (const osg::Vec3 &scale)
const osg::Vec3getCurrentScale () const
void updateCurrentScale (const osg::Vec3 &scale)
void setPutMatrix (const osg::Matrix &put)
const osg::MatrixgetPutMatrix () const
void setInversePutMatrix (const osg::Matrix &inversePut)
const osg::MatrixgetInversePutMatrix () const
void setLimitationFlags (unsigned long flags)
unsigned long getLimitationFlags () const
void setHPRMultOrder (MultOrder order)
MultOrder getHPRMultOrder () const
void setAnimationOn (bool do_animate)
bool getAnimationOn () const
void animate (float deltaTime)
virtual bool computeLocalToWorldMatrix (osg::Matrix &matrix, osg::NodeVisitor *nv) const
virtual bool computeWorldToLocalMatrix (osg::Matrix &matrix, osg::NodeVisitor *nv) const
Public Member Functions inherited from osg::Transform
 Transform ()
 Transform (const Transform &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, Transform)
virtual TransformasTransform ()
virtual const TransformasTransform () const
virtual MatrixTransformasMatrixTransform ()
virtual const MatrixTransformasMatrixTransform () const
virtual PositionAttitudeTransformasPositionAttitudeTransform ()
virtual const PositionAttitudeTransformasPositionAttitudeTransform () const
virtual AutoTransformasAutoTransform ()
virtual const AutoTransformasAutoTransform () const
void setReferenceFrame (ReferenceFrame rf)
ReferenceFrame getReferenceFrame () const
virtual BoundingSphere computeBound () const
Public Member Functions inherited from osg::Group
 Group ()
 Group (const Group &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 META_Node (osg, Group)
virtual GroupasGroup ()
virtual const GroupasGroup () const
virtual bool addChild (Node *child)
template<class T>
bool addChild (const ref_ptr< T > &child)
virtual bool insertChild (unsigned int index, Node *child)
template<class T>
bool insertChild (unsigned int index, const ref_ptr< T > &child)
virtual bool removeChild (Node *child)
template<class T>
bool removeChild (const ref_ptr< T > &child)
bool removeChild (unsigned int pos, unsigned int numChildrenToRemove=1)
virtual bool removeChildren (unsigned int pos, unsigned int numChildrenToRemove)
virtual bool replaceChild (Node *origChild, Node *newChild)
template<class T, class R>
bool replaceChild (const ref_ptr< T > &origChild, const ref_ptr< R > &newChild)
virtual unsigned int getNumChildren () const
virtual bool setChild (unsigned int i, Node *node)
NodegetChild (unsigned int i)
const NodegetChild (unsigned int i) const
bool containsNode (const Node *node) const
template<class T>
bool containsNode (const ref_ptr< T > &node) const
unsigned int getChildIndex (const Node *node) const
virtual void setThreadSafeRefUnref (bool threadSafe)
virtual void resizeGLObjectBuffers (unsigned int maxSize)
virtual void releaseGLObjects (osg::State *=0) const
Public Member Functions inherited from osg::Node
 Node ()
 Node (const Node &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual ObjectcloneType () const
virtual Objectclone (const CopyOp &copyop) const
virtual bool isSameKindAs (const Object *obj) const
virtual const char * libraryName () const
virtual const char * className () const
virtual NodeasNode ()
virtual const NodeasNode () const
virtual DrawableasDrawable ()
virtual const DrawableasDrawable () const
virtual GeometryasGeometry ()
virtual const GeometryasGeometry () const
virtual SwitchasSwitch ()
virtual const SwitchasSwitch () const
virtual GeodeasGeode ()
virtual const GeodeasGeode () const
virtual osgTerrain::TerrainasTerrain ()
virtual const osgTerrain::TerrainasTerrain () const
virtual void accept (NodeVisitor &nv)
virtual void ascend (NodeVisitor &nv)
const ParentListgetParents () const
ParentList getParents ()
GroupgetParent (unsigned int i)
const GroupgetParent (unsigned int i) const
unsigned int getNumParents () const
NodePathList getParentalNodePaths (osg::Node *haltTraversalAtNode=0) const
MatrixList getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const
void setUpdateCallback (Callback *nc)
template<class T>
void setUpdateCallback (const ref_ptr< T > &nc)
CallbackgetUpdateCallback ()
const CallbackgetUpdateCallback () const
void addUpdateCallback (Callback *nc)
template<class T>
void addUpdateCallback (const ref_ptr< T > &nc)
void removeUpdateCallback (Callback *nc)
template<class T>
void removeUpdateCallback (const ref_ptr< T > &nc)
unsigned int getNumChildrenRequiringUpdateTraversal () const
void setEventCallback (Callback *nc)
template<class T>
void setEventCallback (const ref_ptr< T > &nc)
CallbackgetEventCallback ()
const CallbackgetEventCallback () const
void addEventCallback (Callback *nc)
template<class T>
void addEventCallback (const ref_ptr< T > &nc)
void removeEventCallback (Callback *nc)
template<class T>
void removeEventCallback (const ref_ptr< T > &nc)
unsigned int getNumChildrenRequiringEventTraversal () const
void setCullCallback (Callback *nc)
template<class T>
void setCullCallback (const ref_ptr< T > &nc)
CallbackgetCullCallback ()
const CallbackgetCullCallback () const
void addCullCallback (Callback *nc)
template<class T>
void addCullCallback (const ref_ptr< T > &nc)
void removeCullCallback (Callback *nc)
template<class T>
void removeCullCallback (const ref_ptr< T > &nc)
void setCullingActive (bool active)
bool getCullingActive () const
unsigned int getNumChildrenWithCullingDisabled () const
bool isCullingActive () const
unsigned int getNumChildrenWithOccluderNodes () const
bool containsOccluderNodes () const
void setNodeMask (NodeMask nm)
NodeMask getNodeMask () const
void setStateSet (osg::StateSet *stateset)
template<class T>
void setStateSet (const osg::ref_ptr< T > &stateset)
osg::StateSetgetOrCreateStateSet ()
osg::StateSetgetStateSet ()
const osg::StateSetgetStateSet () const
void setDescriptions (const DescriptionList &descriptions)
DescriptionListgetDescriptions ()
const DescriptionListgetDescriptions () const
const std::string & getDescription (unsigned int i) const
std::string & getDescription (unsigned int i)
unsigned int getNumDescriptions () const
void addDescription (const std::string &desc)
void setInitialBound (const osg::BoundingSphere &bsphere)
const BoundingSpheregetInitialBound () const
void dirtyBound ()
const BoundingSpheregetBound () const
void setComputeBoundingSphereCallback (ComputeBoundingSphereCallback *callback)
template<class T>
void setComputeBoundingSphereCallback (const ref_ptr< T > &callback)
ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback ()
const ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback () const
Public Member Functions inherited from osg::Object
 Object ()
 Object (bool threadSafeRefUnref)
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
std::string getCompoundClassName () const
virtual NodeVisitorasNodeVisitor ()
virtual const NodeVisitorasNodeVisitor () const
virtual StateSetasStateSet ()
virtual const StateSetasStateSet () const
virtual StateAttributeasStateAttribute ()
virtual const StateAttributeasStateAttribute () const
virtual UniformasUniform ()
virtual const UniformasUniform () const
virtual CameraasCamera ()
virtual const CameraasCamera () const
virtual CallbackasCallback ()
virtual const CallbackasCallback () const
virtual CallbackObjectasCallbackObject ()
virtual const CallbackObjectasCallbackObject () const
virtual UserDataContainerasUserDataContainer ()
virtual const UserDataContainerasUserDataContainer () const
virtual ValueObjectasValueObject ()
virtual const ValueObjectasValueObject () const
virtual ImageasImage ()
virtual const ImageasImage () const
virtual void setName (const std::string &name)
void setName (const char *name)
const std::string & getName () const
void setDataVariance (DataVariance dv)
DataVariance getDataVariance () const
virtual void computeDataVariance ()
void setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
template<class T>
void setUserData (const ref_ptr< T > &ud)
virtual ReferencedgetUserData ()
virtual const ReferencedgetUserData () const
template<typename T>
bool getUserValue (const std::string &name, T &value) const
template<typename T>
void setUserValue (const std::string &name, const T &value)
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

Protected Member Functions

virtual ~DOFTransform ()
Protected Member Functions inherited from osg::Transform
virtual ~Transform ()
Protected Member Functions inherited from osg::Group
virtual ~Group ()
virtual void childRemoved (unsigned int, unsigned int)
virtual void childInserted (unsigned int)
Protected Member Functions inherited from osg::Node
virtual ~Node ()
void addParent (osg::Group *parent)
void removeParent (osg::Group *parent)
void setNumChildrenRequiringUpdateTraversal (unsigned int num)
void setNumChildrenRequiringEventTraversal (unsigned int num)
void setNumChildrenWithCullingDisabled (unsigned int num)
void setNumChildrenWithOccluderNodes (unsigned int num)
Protected Member Functions inherited from osg::Object
virtual ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Protected Attributes

unsigned int _previousTraversalNumber
double _previousTime
osg::Vec3 _minHPR
osg::Vec3 _maxHPR
osg::Vec3 _currentHPR
osg::Vec3 _incrementHPR
osg::Vec3 _minTranslate
osg::Vec3 _maxTranslate
osg::Vec3 _currentTranslate
osg::Vec3 _incrementTranslate
osg::Vec3 _minScale
osg::Vec3 _maxScale
osg::Vec3 _currentScale
osg::Vec3 _incrementScale
osg::Matrix _Put
osg::Matrix _inversePut
unsigned long _limitationFlags
bool _animationOn
unsigned short _increasingFlags
MultOrder _multOrder
Protected Attributes inherited from osg::Transform
ReferenceFrame _referenceFrame
Protected Attributes inherited from osg::Group
NodeList _children
Protected Attributes inherited from osg::Node
BoundingSphere _initialBound
ref_ptr< ComputeBoundingSphereCallback_computeBoundCallback
BoundingSphere _boundingSphere
bool _boundingSphereComputed
ParentList _parents
ref_ptr< Callback_updateCallback
unsigned int _numChildrenRequiringUpdateTraversal
ref_ptr< Callback_eventCallback
unsigned int _numChildrenRequiringEventTraversal
ref_ptr< Callback_cullCallback
bool _cullingActive
unsigned int _numChildrenWithCullingDisabled
unsigned int _numChildrenWithOccluderNodes
NodeMask _nodeMask
ref_ptr< StateSet_stateset
Protected Attributes inherited from osg::Object
std::string _name
DataVariance _dataVariance
osg::UserDataContainer_userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

Detailed Description

DOFTransform - encapsulates Multigen DOF behavior

Member Enumeration Documentation

◆ MultOrder

Enumerator
PRH 
PHR 
HPR 
HRP 
RPH 
RHP 

Constructor & Destructor Documentation

◆ DOFTransform() [1/2]

osgSim::DOFTransform::DOFTransform ( )

constructor

Referenced by DOFTransform(), and META_Node().

◆ DOFTransform() [2/2]

osgSim::DOFTransform::DOFTransform ( const DOFTransform & dof,
const osg::CopyOp & copyop = osg::CopyOp::SHALLOW_COPY )

copy constructor

References DOFTransform(), and osg::CopyOp::SHALLOW_COPY.

◆ ~DOFTransform()

virtual osgSim::DOFTransform::~DOFTransform ( )
inlineprotectedvirtual

Member Function Documentation

◆ animate()

void osgSim::DOFTransform::animate ( float deltaTime)

◆ computeLocalToWorldMatrix()

virtual bool osgSim::DOFTransform::computeLocalToWorldMatrix ( osg::Matrix & matrix,
osg::NodeVisitor * nv ) const
virtual

Reimplemented from osg::Transform.

◆ computeWorldToLocalMatrix()

virtual bool osgSim::DOFTransform::computeWorldToLocalMatrix ( osg::Matrix & matrix,
osg::NodeVisitor * nv ) const
virtual

Reimplemented from osg::Transform.

◆ getAnimationOn()

bool osgSim::DOFTransform::getAnimationOn ( ) const
inline

References _animationOn.

◆ getCurrentHPR()

const osg::Vec3 & osgSim::DOFTransform::getCurrentHPR ( ) const
inline

References _currentHPR.

◆ getCurrentScale()

const osg::Vec3 & osgSim::DOFTransform::getCurrentScale ( ) const
inline

References _currentScale.

◆ getCurrentTranslate()

const osg::Vec3 & osgSim::DOFTransform::getCurrentTranslate ( ) const
inline

References _currentTranslate.

◆ getHPRMultOrder()

MultOrder osgSim::DOFTransform::getHPRMultOrder ( ) const
inline

References _multOrder.

◆ getIncrementHPR()

const osg::Vec3 & osgSim::DOFTransform::getIncrementHPR ( ) const
inline

References _incrementHPR.

◆ getIncrementScale()

const osg::Vec3 & osgSim::DOFTransform::getIncrementScale ( ) const
inline

References _incrementScale.

◆ getIncrementTranslate()

const osg::Vec3 & osgSim::DOFTransform::getIncrementTranslate ( ) const
inline

References _incrementTranslate.

◆ getInversePutMatrix()

const osg::Matrix & osgSim::DOFTransform::getInversePutMatrix ( ) const
inline

References _inversePut.

◆ getLimitationFlags()

unsigned long osgSim::DOFTransform::getLimitationFlags ( ) const
inline

References _limitationFlags.

◆ getMaxHPR()

const osg::Vec3 & osgSim::DOFTransform::getMaxHPR ( ) const
inline

References _maxHPR.

◆ getMaxScale()

const osg::Vec3 & osgSim::DOFTransform::getMaxScale ( ) const
inline

References _maxScale.

◆ getMaxTranslate()

const osg::Vec3 & osgSim::DOFTransform::getMaxTranslate ( ) const
inline

References _maxTranslate.

◆ getMinHPR()

const osg::Vec3 & osgSim::DOFTransform::getMinHPR ( ) const
inline

References _minHPR.

◆ getMinScale()

const osg::Vec3 & osgSim::DOFTransform::getMinScale ( ) const
inline

References _minScale.

◆ getMinTranslate()

const osg::Vec3 & osgSim::DOFTransform::getMinTranslate ( ) const
inline

References _minTranslate.

◆ getPutMatrix()

const osg::Matrix & osgSim::DOFTransform::getPutMatrix ( ) const
inline

References _Put.

◆ META_Node()

osgSim::DOFTransform::META_Node ( osgSim ,
DOFTransform  )

References DOFTransform().

◆ setAnimationOn()

void osgSim::DOFTransform::setAnimationOn ( bool do_animate)

◆ setCurrentHPR()

void osgSim::DOFTransform::setCurrentHPR ( const osg::Vec3 & hpr)
inline

◆ setCurrentScale()

void osgSim::DOFTransform::setCurrentScale ( const osg::Vec3 & scale)
inline

◆ setCurrentTranslate()

void osgSim::DOFTransform::setCurrentTranslate ( const osg::Vec3 & translate)
inline

◆ setHPRMultOrder()

void osgSim::DOFTransform::setHPRMultOrder ( MultOrder order)
inline

References _multOrder.

◆ setIncrementHPR()

void osgSim::DOFTransform::setIncrementHPR ( const osg::Vec3 & hpr)
inline

References _incrementHPR.

◆ setIncrementScale()

void osgSim::DOFTransform::setIncrementScale ( const osg::Vec3 & scale)
inline

References _incrementScale.

◆ setIncrementTranslate()

void osgSim::DOFTransform::setIncrementTranslate ( const osg::Vec3 & translate)
inline

References _incrementTranslate.

◆ setInversePutMatrix()

void osgSim::DOFTransform::setInversePutMatrix ( const osg::Matrix & inversePut)
inline

◆ setLimitationFlags()

void osgSim::DOFTransform::setLimitationFlags ( unsigned long flags)
inline

References _limitationFlags.

◆ setMaxHPR()

void osgSim::DOFTransform::setMaxHPR ( const osg::Vec3 & hpr)
inline

References _maxHPR.

◆ setMaxScale()

void osgSim::DOFTransform::setMaxScale ( const osg::Vec3 & scale)
inline

References _maxScale.

◆ setMaxTranslate()

void osgSim::DOFTransform::setMaxTranslate ( const osg::Vec3 & translate)
inline

References _maxTranslate.

◆ setMinHPR()

void osgSim::DOFTransform::setMinHPR ( const osg::Vec3 & hpr)
inline

References _minHPR.

◆ setMinScale()

void osgSim::DOFTransform::setMinScale ( const osg::Vec3 & scale)
inline

References _minScale.

◆ setMinTranslate()

void osgSim::DOFTransform::setMinTranslate ( const osg::Vec3 & translate)
inline

References _minTranslate.

◆ setPutMatrix()

void osgSim::DOFTransform::setPutMatrix ( const osg::Matrix & put)
inline

References _Put, and osg::Node::dirtyBound().

◆ traverse()

virtual void osgSim::DOFTransform::traverse ( osg::NodeVisitor & )
virtual

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Group.

◆ updateCurrentHPR()

void osgSim::DOFTransform::updateCurrentHPR ( const osg::Vec3 & hpr)

◆ updateCurrentScale()

void osgSim::DOFTransform::updateCurrentScale ( const osg::Vec3 & scale)

◆ updateCurrentTranslate()

void osgSim::DOFTransform::updateCurrentTranslate ( const osg::Vec3 & translate)

Member Data Documentation

◆ _animationOn

bool osgSim::DOFTransform::_animationOn
protected

Referenced by getAnimationOn().

◆ _currentHPR

osg::Vec3 osgSim::DOFTransform::_currentHPR
protected

Referenced by getCurrentHPR(), and setCurrentHPR().

◆ _currentScale

osg::Vec3 osgSim::DOFTransform::_currentScale
protected

Referenced by getCurrentScale(), and setCurrentScale().

◆ _currentTranslate

osg::Vec3 osgSim::DOFTransform::_currentTranslate
protected

◆ _increasingFlags

unsigned short osgSim::DOFTransform::_increasingFlags
protected

flags indicating whether value is incerasing or decreasing in animation bits form right to left, 1 means increasing while 0 is decreasing 0 = x translation 1 = y translation 2 = z translation 3 = pitch 4 = roll 5 = yaw 6 = x scale 7 = y scale 8 = z scale

◆ _incrementHPR

osg::Vec3 osgSim::DOFTransform::_incrementHPR
protected

Referenced by getIncrementHPR(), and setIncrementHPR().

◆ _incrementScale

osg::Vec3 osgSim::DOFTransform::_incrementScale
protected

◆ _incrementTranslate

osg::Vec3 osgSim::DOFTransform::_incrementTranslate
protected

◆ _inversePut

osg::Matrix osgSim::DOFTransform::_inversePut
protected

◆ _limitationFlags

unsigned long osgSim::DOFTransform::_limitationFlags
protected

◆ _maxHPR

osg::Vec3 osgSim::DOFTransform::_maxHPR
protected

Referenced by getMaxHPR(), and setMaxHPR().

◆ _maxScale

osg::Vec3 osgSim::DOFTransform::_maxScale
protected

Referenced by getMaxScale(), and setMaxScale().

◆ _maxTranslate

osg::Vec3 osgSim::DOFTransform::_maxTranslate
protected

Referenced by getMaxTranslate(), and setMaxTranslate().

◆ _minHPR

osg::Vec3 osgSim::DOFTransform::_minHPR
protected

Referenced by getMinHPR(), and setMinHPR().

◆ _minScale

osg::Vec3 osgSim::DOFTransform::_minScale
protected

Referenced by getMinScale(), and setMinScale().

◆ _minTranslate

osg::Vec3 osgSim::DOFTransform::_minTranslate
protected

Referenced by getMinTranslate(), and setMinTranslate().

◆ _multOrder

MultOrder osgSim::DOFTransform::_multOrder
protected

Referenced by getHPRMultOrder(), and setHPRMultOrder().

◆ _previousTime

double osgSim::DOFTransform::_previousTime
protected

◆ _previousTraversalNumber

unsigned int osgSim::DOFTransform::_previousTraversalNumber
protected

◆ _Put

osg::Matrix osgSim::DOFTransform::_Put
protected

Referenced by getPutMatrix(), and setPutMatrix().


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