Fixed the frame rate reporting so that it handles the case when animation is slowed or speeded up
This commit is contained in:
parent
e41ee9f951
commit
c3af8b1c8e
@ -171,9 +171,12 @@ void AnimationPathManipulator::handleFrame( double time )
|
||||
|
||||
if (_printOutTimingInfo)
|
||||
{
|
||||
double delta = (animTime-_animStartOfTimedPeriod);
|
||||
if (delta>=_animationPath->getPeriod())
|
||||
double animDelta = (animTime-_animStartOfTimedPeriod);
|
||||
if (animDelta>=_animationPath->getPeriod())
|
||||
{
|
||||
|
||||
double delta = time-_realStartOfTimedPeriod;
|
||||
|
||||
double frameRate = (double)_numOfFramesSinceStartOfTimedPeriod/delta;
|
||||
osg::notify(osg::NOTICE) <<"AnimatonPath completed in "<<delta<<" seconds, completing "<<_numOfFramesSinceStartOfTimedPeriod<<" frames,"<<std::endl;
|
||||
osg::notify(osg::NOTICE) <<" average frame rate = "<<frameRate<<std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user