Added new osganimate demo which demonstrate the osg::AnimationPath in action.

Added extra parameters to the AnimationPath callbacks to allow finer control.
This commit is contained in:
Robert Osfield
2002-10-07 19:51:11 +00:00
parent 478f736f63
commit b7372fb4cb
12 changed files with 415 additions and 7 deletions

View File

@@ -42,7 +42,7 @@ void MatrixTransform::AnimationPathCallback::operator()(Node* node, NodeVisitor*
double time = nv->getFrameStamp()->getReferenceTime();
if (_firstTime==0.0) _firstTime = time;
Matrix matrix;
if (_animationPath->getMatrix(time-_firstTime,matrix))
if (_animationPath->getMatrix(((time-_firstTime)-_timeOffset)*_timeMultiplier,matrix))
{
mt->setMatrix(matrix);
}