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

@@ -16,13 +16,18 @@
using namespace osgAnimation;
Animation::Animation(const osgAnimation::Animation& anim, const osg::CopyOp& c)
Animation::Animation(const osgAnimation::Animation& anim, const osg::CopyOp& copyop):
_duration(anim._duration),
_originalDuration(anim._originalDuration),
_weight(anim._weight),
_startTime(anim._startTime),
_playmode(anim._playmode)
{
_duration = anim._duration;
_originalDuration = anim._originalDuration;
_weight = anim._weight;
_startTime = anim._startTime;
_playmode = anim._playmode;
const ChannelList& cl = anim.getChannels();
for (ChannelList::const_iterator it = cl.begin(); it != cl.end(); it++)
{
addChannel(it->get()->clone());
}
}