osgAnimation::MorphGeometry Class Reference

Inheritance diagram for osgAnimation::MorphGeometry:

osg::Geometry osg::Drawable osg::Object osg::Referenced

List of all members.

Public Types

enum  Method { NORMALIZED, RELATIVE }
typedef std::vector< MorphTargetMorphTargetList

Public Member Functions

 MorphGeometry ()
 MorphGeometry (const osg::Geometry &b)
 MorphGeometry (const MorphGeometry &b, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
virtual osg::ObjectcloneType () const
virtual osg::Objectclone (const osg::CopyOp &copyop) const
virtual bool isSameKindAs (const osg::Object *obj) const
virtual const char * libraryName () const
virtual const char * className () const
virtual void transformSoftwareMethod ()
void setMethod (Method method)
Method getMethod () const
void setMorphNormals (bool morphNormals)
bool getMorphNormals () const
virtual void addMorphTarget (osg::Geometry *morphTarget, float weight=1.0)
void setWeight (unsigned int index, float morphWeight)
void dirty ()
const MorphTargetListgetMorphTargetList () const
MorphTargetListgetMorphTargetList ()
const MorphTargetgetMorphTarget (unsigned int i) const
MorphTargetgetMorphTarget (unsigned int i)

Protected Attributes

bool _dirty
 Do we need to recalculate the morphed geometry?
Method _method
MorphTargetList _morphTargets
std::vector< osg::Vec3_positionSource
std::vector< osg::Vec3_normalSource
bool _morphNormals
 Do we also morph between normals?

Classes

class  MorphTarget
struct  UpdateVertex


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
NORMALIZED 
RELATIVE 


Constructor & Destructor Documentation

osgAnimation::MorphGeometry::MorphGeometry (  ) 

osgAnimation::MorphGeometry::MorphGeometry ( const osg::Geometry b  ) 

osgAnimation::MorphGeometry::MorphGeometry ( const MorphGeometry b,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)


Member Function Documentation

virtual osg::Object* osgAnimation::MorphGeometry::cloneType (  )  const [inline, virtual]

Clone the type of an object, with Object* return type. Must be defined by derived classes.

Reimplemented from osg::Geometry.

virtual osg::Object* osgAnimation::MorphGeometry::clone ( const osg::CopyOp  )  const [inline, virtual]

Clone an object, with Object* return type. Must be defined by derived classes.

Reimplemented from osg::Geometry.

virtual bool osgAnimation::MorphGeometry::isSameKindAs ( const osg::Object obj  )  const [inline, virtual]

Reimplemented from osg::Geometry.

References NULL.

virtual const char* osgAnimation::MorphGeometry::libraryName (  )  const [inline, virtual]

return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Reimplemented from osg::Geometry.

virtual const char* osgAnimation::MorphGeometry::className (  )  const [inline, virtual]

return the name of the object's class type. Must be defined by derived classes.

Reimplemented from osg::Geometry.

virtual void osgAnimation::MorphGeometry::transformSoftwareMethod (  )  [virtual]

void osgAnimation::MorphGeometry::setMethod ( Method  method  )  [inline]

Set the morphing method.

Method osgAnimation::MorphGeometry::getMethod (  )  const [inline]

Get the morphing method.

void osgAnimation::MorphGeometry::setMorphNormals ( bool  morphNormals  )  [inline]

Set flag for morphing normals.

bool osgAnimation::MorphGeometry::getMorphNormals (  )  const [inline]

Get the flag for morphing normals.

virtual void osgAnimation::MorphGeometry::addMorphTarget ( osg::Geometry morphTarget,
float  weight = 1.0 
) [inline, virtual]

Add a MorphTarget to the MorphGeometry. If MorphTarget is not NULL and is not contained in the MorphGeometry then increment its reference count, add it to the MorphTargets list and dirty the bounding sphere to force it to be recomputed on the next call to getBound().

Parameters:
morphTarget The MorphTarget to be added to the MorphGeometry.
weight The weight to be added to the MorphGeometry.
Returns:
true for success; false otherwise.

void osgAnimation::MorphGeometry::setWeight ( unsigned int  index,
float  morphWeight 
) [inline]

void osgAnimation::MorphGeometry::dirty (  )  [inline]

Set the MorphGeometry dirty.

const MorphTargetList& osgAnimation::MorphGeometry::getMorphTargetList (  )  const [inline]

Get the list of MorphTargets.

MorphTargetList& osgAnimation::MorphGeometry::getMorphTargetList (  )  [inline]

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

const MorphTarget& osgAnimation::MorphGeometry::getMorphTarget ( unsigned int  i  )  const [inline]

Return the MorphTarget at position i.

MorphTarget& osgAnimation::MorphGeometry::getMorphTarget ( unsigned int  i  )  [inline]

Return the MorphTarget at position i.


Member Data Documentation

Do we need to recalculate the morphed geometry?

Do we also morph between normals?


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

Generated on Sat Mar 20 12:34:00 2010 for openscenegraph by  doxygen 1.5.6