From Cedric Pinson, fix constructors for cloning osgAnimation objects

This commit is contained in:
Cedric Pinson
2009-06-22 14:24:59 +00:00
parent c0c47b2eca
commit 658d96aa64
10 changed files with 50 additions and 21 deletions

View File

@@ -57,11 +57,18 @@ void AnimationManagerBase::operator()(osg::Node* node, osg::NodeVisitor* nv)
}
AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) : osg::NodeCallback(b,copyop)
AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) : osg::NodeCallback(b,copyop)
{
_animations = b._animations;
_targets = b._targets;
_needToLink = b._needToLink;
const AnimationList& animationList = b.getAnimationList();
for (AnimationList::const_iterator it = animationList.begin();
it != animationList.end();
it++)
{
Animation* animation = dynamic_cast<osgAnimation::Animation*>(it->get()->clone(copyop));
_animations.push_back(animation);
}
_needToLink = true;
buildTargetReference();
}
void AnimationManagerBase::buildTargetReference()