Hi Jae,
 
I did this very same thing.  Actually I wanted mine to not just PAUSE, but to play forward, reversem and scrub with the mouse.  I was reading in an entire scene graph from a file (A .lws, lightwave scene actually), so the AnimationPath stuff was already built in and I did not want to mess with it, or even have to traverse and find the handles for all of the animation paths.
 
What I really wanted to do was be able to set the time myself rather than let the Viewer do it for me.  I personally like using osgProducer::OsgCameraGroup rather than the Viewer.  The Viewer keeps track of a timer and does all of the following stuff under the hood, and I couldn't find out how to modify that easily (maybe there is Robert?).
 
What is happening underneath is that you create an osg::FrameStamp, set its time and frame number to whatever you want, (normally you keep track of a little timer and update it, but this way you can set the time yourself), then create an osgUtil::UpdateVisitor and set its framestamp to the one you just created, then you have the scene graph accept the update visitor.
 
-- Rick
 
 
 
 
 
Hi Jae,
The osg::AnimationPathCallback has code in it for pausing, restarting.
 You attach the AnimationPath to the AnimationPathCallback, then
attach this to the Node you want to animate.
Robert.
 
 
Hi,
Currently I am working on a viewer with scenario feature.
Within the scenario, the user can load a txt file with list of camera position and rotation and the viewer produce a camera path.
This has been achieved by useing the osg::animationPath and osg::Timer.
Now I would like to add start, stop and pause. However I could not find any documentation about stop the animationPath.
Is this possible? If so how?
If it is not possible, is it going to be added in future?
Thank you in advance
Jae
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to