Public Types | |
enum | Method { NORMALIZED, RELATIVE } |
typedef std::vector< MorphTarget > | MorphTargetList |
Public Member Functions | |
MorphGeometry () | |
MorphGeometry (const osg::Geometry &b) | |
MorphGeometry (const MorphGeometry &b, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
virtual osg::Object * | cloneType () const |
virtual osg::Object * | clone (const osg::CopyOp ©op) 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 MorphTargetList & | getMorphTargetList () const |
MorphTargetList & | getMorphTargetList () |
const MorphTarget & | getMorphTarget (unsigned int i) const |
MorphTarget & | getMorphTarget (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 |
typedef std::vector<MorphTarget> osgAnimation::MorphGeometry::MorphTargetList |
osgAnimation::MorphGeometry::MorphGeometry | ( | ) |
osgAnimation::MorphGeometry::MorphGeometry | ( | const osg::Geometry & | b | ) |
osgAnimation::MorphGeometry::MorphGeometry | ( | const MorphGeometry & | b, | |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY | |||
) |
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] |
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] |
Referenced by osgAnimation::MorphGeometry::UpdateVertex::update().
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()
.
morphTarget | The MorphTarget to be added to the MorphGeometry . | |
weight | The weight to be added to the MorphGeometry . |
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
.
bool osgAnimation::MorphGeometry::_dirty [protected] |
Do we need to recalculate the morphed geometry?
Method osgAnimation::MorphGeometry::_method [protected] |
std::vector<osg::Vec3> osgAnimation::MorphGeometry::_positionSource [protected] |
std::vector<osg::Vec3> osgAnimation::MorphGeometry::_normalSource [protected] |
bool osgAnimation::MorphGeometry::_morphNormals [protected] |
Do we also morph between normals?