OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
SceneUtil::Skeleton Class Reference

Handles the bone matrices for any number of child RigGeometries. More...

#include <skeleton.hpp>

Inheritance diagram for SceneUtil::Skeleton:
Collaboration diagram for SceneUtil::Skeleton:

Public Types

enum  ActiveType { Inactive =0, SemiActive, Active }
 

Public Member Functions

 Skeleton ()
 
 Skeleton (const Skeleton &copy, const osg::CopyOp &copyop)
 
void setActive (ActiveType active)
 
bool getActive () const
 
void traverse (osg::NodeVisitor &nv)
 
void markDirty ()
 
virtual void childInserted (unsigned int)
 
virtual void childRemoved (unsigned int, unsigned int)
 

Private Types

typedef std::map< std::string,
std::pair< osg::NodePath,
osg::MatrixTransform * > > 
BoneCache
 

Private Attributes

std::unique_ptr< BonemRootBone
 
BoneCache mBoneCache
 
bool mBoneCacheInit
 
bool mNeedToUpdateBoneMatrices
 
ActiveType mActive
 
unsigned int mLastFrameNumber
 
unsigned int mLastCullFrameNumber
 

Detailed Description

Handles the bone matrices for any number of child RigGeometries.

Bones should be created as osg::MatrixTransform children of the skeleton.
To be a referenced by a RigGeometry, a bone needs to have a unique name.

Member Typedef Documentation

typedef std::map<std::string, std::pair<osg::NodePath, osg::MatrixTransform*> > SceneUtil::Skeleton::BoneCache
private

Member Enumeration Documentation

Enumerator
Inactive 
SemiActive 
Active 

Like Active, but don't bother with Update (including new bounding box) if we're off-screen.

Constructor & Destructor Documentation

SceneUtil::Skeleton::Skeleton ( )
SceneUtil::Skeleton::Skeleton ( const Skeleton copy,
const osg::CopyOp &  copyop 
)

Member Function Documentation

void SceneUtil::Skeleton::childInserted ( unsigned  int)
virtual

Here is the call graph for this function:

void SceneUtil::Skeleton::childRemoved ( unsigned  int,
unsigned  int 
)
virtual

Here is the call graph for this function:

bool SceneUtil::Skeleton::getActive ( ) const

Here is the caller graph for this function:

void SceneUtil::Skeleton::markDirty ( )

Here is the caller graph for this function:

void SceneUtil::Skeleton::setActive ( ActiveType  active)

Set the skinning active flag. Inactive skeletons will not have their child rigs updated. You should set this flag to false if you know that bones are not currently moving.

Here is the caller graph for this function:

void SceneUtil::Skeleton::traverse ( osg::NodeVisitor &  nv)

Here is the call graph for this function:

Member Data Documentation

ActiveType SceneUtil::Skeleton::mActive
private
BoneCache SceneUtil::Skeleton::mBoneCache
private
bool SceneUtil::Skeleton::mBoneCacheInit
private
unsigned int SceneUtil::Skeleton::mLastCullFrameNumber
private
unsigned int SceneUtil::Skeleton::mLastFrameNumber
private
bool SceneUtil::Skeleton::mNeedToUpdateBoneMatrices
private
std::unique_ptr<Bone> SceneUtil::Skeleton::mRootBone
private

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