[osg-users] AnimationPathCallback timeMultiplier

Dickinson, Alan J. ALAN.J.DICKINSON at saic.com
Thu Sep 4 10:43:04 PDT 2008

Hi Ulrich and Robert,
I agree with you Ulrich. I have been looking at the getAnimationTime
method which uses an absolute time calculation instead of a relative
delta time approach. I am working on adding a _prevTime instance
variable to the operator() method to save the _latestTime from the
previous timestamp. Then calculate the animationTime as you suggested. 
Not sure how the timeOffset is suppose to work. In the original absolute
formula it is subtracted from the ((Tlast-Tfirst) - timeOffset) *
timeMultiplier but that seems to be a negative offset. Is this the
correct interpretation or am I missing the intent of the timeOffset.
Also I am in the process of adding the ability to single step the
animation while it is paused. I think I need to change the pauseTime by
my stepSize to make this happen but I need to fix the getAnimationTime
method first. 
How do I force the animation to redraw while it is paused with the new
pauseTime value?
FYI: I have been working with both 2.4 and 2.6 released versions
Thanks again for your help,
>Hi Alan and Robert,
>Robert Osfield wrote:
>> The sounds very much like a bug where the pause code is being broken
>> by changes in the multiplier.  Have a look at the
>> AnimationPathCallback implementation to see if you can spot what
> amiss.
>I believe this behaviour is due to the way the animation time is
>It's not incremental (t += dt * timeMultiplier) which would be
continuous when the
>multipler changes, but absolute (t = (Tlast - Tfirst) * timeMultiplier)
which will jump
>when you change the multiplier.



Alan Dickinson

SAIC Intelligent Systems Applications Division

Sr. Software Engineer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080904/5289a1f1/attachment-0003.htm>

More information about the osg-users mailing list