OpenSceneGraph 2.8.4
Classes | Public Types | Public Member Functions | Protected Attributes
osgAnimation::MorphGeometry Class Reference
Inheritance diagram for osgAnimation::MorphGeometry:
Inheritance graph
[legend]

List of all members.

Classes

class  MorphTarget
struct  UpdateVertex

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
 Clone the type of an object, with Object* return type.
virtual osg::Objectclone (const osg::CopyOp &copyop) const
 Clone an object, with Object* return type.
virtual bool isSameKindAs (const osg::Object *obj) const
virtual const char * libraryName () const
 return the name of the object's library.
virtual const char * className () const
 return the name of the object's class type.
virtual void transformSoftwareMethod ()
void setMethod (Method method)
 Set the morphing method.
Method getMethod () const
 Get the morphing method.
void setMorphNormals (bool morphNormals)
 Set flag for morphing normals.
bool getMorphNormals () const
 Get the flag for morphing normals.
virtual void addMorphTarget (osg::Geometry *morphTarget, float weight=1.0)
 Add a MorphTarget to the MorphGeometry.
void setWeight (unsigned int index, float morphWeight)
void dirty ()
 Set the MorphGeometry dirty.
const MorphTargetListgetMorphTargetList () const
 Get the list of MorphTargets.
MorphTargetListgetMorphTargetList ()
 Get the list of MorphTargets.
const MorphTargetgetMorphTarget (unsigned int i) const
 Return the MorphTarget at position i.
MorphTargetgetMorphTarget (unsigned int i)
 Return the MorphTarget at position 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?

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 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:
morphTargetThe MorphTarget to be added to the MorphGeometry.
weightThe weight to be added to the MorphGeometry.
Returns:
true for success; false otherwise.
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 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 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.

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

Set the MorphGeometry dirty.

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

Get the morphing method.

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

Get the flag for morphing normals.

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.

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

Get the list of MorphTargets.

Warning if you modify this array you will have to call dirty()

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

Get the list of MorphTargets.

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.

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

Set the morphing method.

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

Set flag for morphing normals.

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

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:

osg logo
Generated at Sun Jan 8 2012 13:16:28 for the OpenSceneGraph by doxygen 1.7.4.