Hello

This is my question about the scene I use.
I currently use a OSG model, animated with 51 frames.

The problem:
- I have 2 inputs (2 number of frames, for example 20 and 40)
- I want to display the animation between frame No.20 and frame No.40 and stop 
at this number 40

In the beginning the animation turns in loops. So I activate this capability 
after a long time. The animation has to come back to frame 20.
I do like this, when I activate the rewind (I use the AnimationPathCallback of 
the main node of the scene):

time0 = AnimationPathCallback[0]->getAnimationPath()->getPeriod() * 20 / 
AnimationPathCallback[0]->getAnimationPath()->getTimeControlPointMap().size() / 
AnimationPathCallback[0]->getTimeMultiplier();

Viewer->frame(time0);

It works. It comes back to time0

But after, in the main loop I use
Viewer->frame();
It uses the "simulation time" so it continues with the simulation time before 
my rewind.

Do you know how resetting that simulation time to time0 ?
I tried with:
Viewer->getFrameStamp()->setSimulationTime(T0);
Viewer->getFrameStamp()->setReferenceTime(T0);

but it does not work.


Thanks in advance for your help.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=35761#35761





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to