OpenSceneGraph 2.8.3
|
Classes | |
class | MorphTarget |
struct | UpdateVertex |
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 |
Clone the type of an object, with Object* return type. | |
virtual osg::Object * | clone (const osg::CopyOp ©op) 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 MorphTargetList & | getMorphTargetList () const |
Get the list of MorphTargets. | |
MorphTargetList & | getMorphTargetList () |
Get the list of MorphTargets. | |
const MorphTarget & | getMorphTarget (unsigned int i) const |
Return the MorphTarget at position i . | |
MorphTarget & | getMorphTarget (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? |
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 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. 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] |
Referenced by osgAnimation::MorphGeometry::UpdateVertex::update().
bool osgAnimation::MorphGeometry::_dirty [protected] |
Do we need to recalculate the morphed geometry?
Method osgAnimation::MorphGeometry::_method [protected] |
bool osgAnimation::MorphGeometry::_morphNormals [protected] |
Do we also morph between normals?
std::vector<osg::Vec3> osgAnimation::MorphGeometry::_normalSource [protected] |
std::vector<osg::Vec3> osgAnimation::MorphGeometry::_positionSource [protected] |
![]() | Generated at Tue Mar 22 2011 13:20:24 for the OpenSceneGraph by doxygen 1.7.3. |