Refactored how the callbacks for updating geometry are managed in MorphGeometry and RigGeometry to address bugs in serialization.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14784 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -48,18 +48,6 @@ namespace osgAnimation
|
||||
|
||||
typedef std::vector<MorphTarget> MorphTargetList;
|
||||
|
||||
struct UpdateVertex : public osg::Drawable::UpdateCallback
|
||||
{
|
||||
virtual void update(osg::NodeVisitor*, osg::Drawable* drw)
|
||||
{
|
||||
MorphGeometry* geom = dynamic_cast<MorphGeometry*>(drw);
|
||||
if (!geom)
|
||||
return;
|
||||
|
||||
geom->transformSoftwareMethod();
|
||||
}
|
||||
};
|
||||
|
||||
MorphGeometry();
|
||||
MorphGeometry(const osg::Geometry& b);
|
||||
MorphGeometry(const MorphGeometry& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
@@ -149,6 +137,25 @@ namespace osgAnimation
|
||||
bool link(osgAnimation::Channel* channel);
|
||||
};
|
||||
|
||||
struct UpdateMorphGeometry : public osg::Drawable::UpdateCallback
|
||||
{
|
||||
UpdateMorphGeometry() {}
|
||||
|
||||
UpdateMorphGeometry(const UpdateMorphGeometry&, const osg::CopyOp&) {}
|
||||
|
||||
META_Object(osgAnimation, UpdateMorphGeometry);
|
||||
|
||||
virtual void update(osg::NodeVisitor*, osg::Drawable* drw)
|
||||
{
|
||||
MorphGeometry* geom = dynamic_cast<MorphGeometry*>(drw);
|
||||
if (!geom)
|
||||
return;
|
||||
|
||||
geom->transformSoftwareMethod();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user