From Michael Platings, I have removed Target::normalize() as calling it was incorrect - the interpolation is already done in such a way that the Target's value is always normalized.

Finally, I have fixed TemplateTarget<osg::Quat>::lerp() as it was giving incorrect results when interpolating between some small rotations.
From Cedric Pinson, i renamed the method in channel to be more general. Adjusted the CubicBezier key constructor to use a single value as input.
This commit is contained in:
Cedric Pinson
2009-09-09 09:52:54 +00:00
parent a851b0b412
commit 9b95a78e5d
8 changed files with 45 additions and 41 deletions

View File

@@ -30,11 +30,6 @@ void AnimationManagerBase::clearTargets()
for (TargetSet::iterator it = _targets.begin(); it != _targets.end(); it++)
(*it).get()->reset();
}
void AnimationManagerBase::normalizeTargets()
{
for (TargetSet::iterator it = _targets.begin(); it != _targets.end(); it++)
(*it).get()->normalize();
}
void AnimationManagerBase::operator()(osg::Node* node, osg::NodeVisitor* nv)
{

View File

@@ -113,9 +113,6 @@ void BasicAnimationManager::update (double time)
toremove.pop_back();
}
}
for (TargetSet::iterator it = _targets.begin(); it != _targets.end(); it++)
(*it).get()->normalize();
}

View File

@@ -53,7 +53,6 @@ ADD_LIBRARY(${LIB_NAME}
ActionVisitor.cpp
Animation.cpp
AnimationManagerBase.cpp
AnimationManager.cpp
BasicAnimationManager.cpp
Bone.cpp
BoneMapVisitor.cpp

View File

@@ -1,5 +1,5 @@
/* -*-c++-*-
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
@@ -36,5 +36,4 @@ void TimelineAnimationManager::update(double time)
{
clearTargets();
_timeline->update(time);
normalizeTargets();
}