15 #ifndef OSGANIMATION_MORPHGEOMETRY_H
16 #define OSGANIMATION_MORPHGEOMETRY_H
18 #include <osgAnimation/Export>
19 #include <osgAnimation/AnimationUpdateCallback>
20 #include <osg/Geometry>
58 virtual const char*
libraryName()
const {
return "osgAnimation"; }
59 virtual const char*
className()
const {
return "MorphGeometry"; }
61 virtual void transformSoftwareMethod();
84 void setWeight(
unsigned int index,
float morphWeight)
86 if (index < _morphTargets.size())
88 _morphTargets[index].setWeight(morphWeight);
136 bool needLink()
const;
#define OSGANIMATION_EXPORT
bool _morphNormals
Do we also morph between normals?
UpdateMorphGeometry(const UpdateMorphGeometry &, const osg::CopyOp &)
void setWeight(float weight)
virtual bool isSameKindAs(const osg::Object *obj) const
META_Object(osgAnimation, UpdateMorphGeometry)
virtual void addMorphTarget(osg::Geometry *morphTarget, float weight=1.0)
MorphTargetList & getMorphTargetList()
MorphTarget(osg::Geometry *geom, float w=1.0)
virtual void update(osg::NodeVisitor *, osg::Drawable *drw)
void setGeometry(osg::Geometry *geom)
std::vector< osg::Vec3 > _normalSource
virtual const char * libraryName() const
#define META_Object(library, name)
bool _dirty
Do we need to recalculate the morphed geometry?
std::vector< MorphTarget > MorphTargetList
virtual osg::Object * cloneType() const
void setMorphNormals(bool morphNormals)
const osg::Geometry * getGeometry() const
virtual void transformSoftwareMethod()
void setMethod(Method method)
void setWeight(unsigned int index, float morphWeight)
virtual const char * className() const
MorphTarget & getMorphTarget(unsigned int i)
osg::Geometry * getGeometry()
std::vector< osg::Vec3 > _positionSource
MorphTargetList _morphTargets
bool getMorphNormals() const
const MorphTarget & getMorphTarget(unsigned int i) const
const MorphTargetList & getMorphTargetList() const
osg::ref_ptr< osg::Geometry > _geom
virtual osg::Object * clone(const osg::CopyOp ©op) const
std::map< int, osg::ref_ptr< osgAnimation::FloatTarget > > _weightTargets