From Michael Platings, I've moved the matrix updating from UpdateSkeleton to UpdateBone. UpdateSkeleton now merely checks that Bones appear before other children and issues a warning if this isn't the case

This commit is contained in:
Cedric Pinson
2009-08-27 16:21:01 +00:00
parent 729d5205ef
commit 3f9216800d
4 changed files with 160 additions and 118 deletions

View File

@@ -27,12 +27,16 @@ namespace osgAnimation
public:
META_Node(osgAnimation, Skeleton);
struct OSGANIMATION_EXPORT UpdateSkeleton : public osg::NodeCallback
class OSGANIMATION_EXPORT UpdateSkeleton : public osg::NodeCallback
{
public:
META_Object(osgAnimation, UpdateSkeleton);
UpdateSkeleton() {}
UpdateSkeleton() : _needValidate(true) {}
UpdateSkeleton(const UpdateSkeleton& us, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : osg::Object(us, copyop), osg::NodeCallback(us, copyop) {}
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
protected:
bool _needValidate;
};
Skeleton(const Skeleton& b, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : Bone(b,copyop) {}