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

Vertex morphing implementation. More...

#include <morphgeometry.hpp>

Inheritance diagram for SceneUtil::MorphGeometry:
Collaboration diagram for SceneUtil::MorphGeometry:

Classes

class  MorphTarget
 

Public Types

typedef std::vector< MorphTargetMorphTargetList
 

Public Member Functions

 MorphGeometry ()
 
 MorphGeometry (const MorphGeometry &copy, const osg::CopyOp &copyop)
 
virtual void addMorphTarget (osg::Vec3Array *offsets, float weight=1.0)
 
void dirty ()
 
const MorphTargetListgetMorphTargetList () const
 
MorphTargetListgetMorphTargetList ()
 
const MorphTargetgetMorphTarget (unsigned int i) const
 
MorphTargetgetMorphTarget (unsigned int i)
 
osg::ref_ptr< osg::Geometry > getSourceGeometry () const
 
virtual void accept (osg::NodeVisitor &nv)
 
virtual bool supports (const osg::PrimitiveFunctor &) const
 
virtual void accept (osg::PrimitiveFunctor &) const
 
virtual osg::BoundingBox computeBoundingBox () const
 

Private Member Functions

void cull (osg::NodeVisitor *nv)
 
osg::Geometry * getGeometry (unsigned int frame) const
 

Private Attributes

MorphTargetList mMorphTargets
 
osg::ref_ptr< osg::Geometry > mSourceGeometry
 
osg::ref_ptr< osg::Geometry > mGeometry [2]
 
unsigned int mLastFrameNumber
 
bool mDirty
 
bool mMorphedBoundingBox
 

Detailed Description

Vertex morphing implementation.

Note
The internal Geometry used for rendering is double buffered, this allows updates to be done in a thread safe way while not compromising rendering performance. This is crucial when using osg's default threading model of DrawThreadPerContext.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Here is the call graph for this function:

Member Function Documentation

void SceneUtil::MorphGeometry::accept ( osg::NodeVisitor &  nv)
virtual

Here is the call graph for this function:

void SceneUtil::MorphGeometry::accept ( osg::PrimitiveFunctor &  func) const
virtual

Here is the call graph for this function:

void SceneUtil::MorphGeometry::addMorphTarget ( osg::Vec3Array *  offsets,
float  weight = 1.0 
)
virtual

Here is the call graph for this function:

osg::BoundingBox SceneUtil::MorphGeometry::computeBoundingBox ( ) const
virtual
void SceneUtil::MorphGeometry::cull ( osg::NodeVisitor *  nv)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void SceneUtil::MorphGeometry::dirty ( )

Set the MorphGeometry dirty.

Here is the caller graph for this function:

osg::Geometry * SceneUtil::MorphGeometry::getGeometry ( unsigned int  frame) const
private

Here is the caller graph for this function:

const MorphTarget& SceneUtil::MorphGeometry::getMorphTarget ( unsigned int  i) const
inline

Return the MorphTarget at position i.

MorphTarget& SceneUtil::MorphGeometry::getMorphTarget ( unsigned int  i)
inline

Return the MorphTarget at position i.

const MorphTargetList& SceneUtil::MorphGeometry::getMorphTargetList ( ) const
inline

Get the list of MorphTargets.

MorphTargetList& SceneUtil::MorphGeometry::getMorphTargetList ( )
inline

Get the list of MorphTargets. Warning if you modify this array you will have to call dirty()

osg::ref_ptr< osg::Geometry > SceneUtil::MorphGeometry::getSourceGeometry ( ) const

Here is the caller graph for this function:

virtual bool SceneUtil::MorphGeometry::supports ( const osg::PrimitiveFunctor &  ) const
inlinevirtual

Member Data Documentation

bool SceneUtil::MorphGeometry::mDirty
private
osg::ref_ptr<osg::Geometry> SceneUtil::MorphGeometry::mGeometry[2]
private
unsigned int SceneUtil::MorphGeometry::mLastFrameNumber
private
bool SceneUtil::MorphGeometry::mMorphedBoundingBox
mutableprivate
MorphTargetList SceneUtil::MorphGeometry::mMorphTargets
private
osg::ref_ptr<osg::Geometry> SceneUtil::MorphGeometry::mSourceGeometry
private

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