OK so I ended up taking osgviewer application and modified the last line from:
 
Code:
return viewer.run();

 

to:

Code:
    double simTime = 0.0;
    while( !viewer.done() )
    {
        //fire off the cull and draw traversals of the scene.           
        viewer.frame(simTime);
                printf("%f\n",viewer.getFrameStamp()->getSimulationTime());
                simTime+=1.0;
        }


I then run my modified osgviewer as so:

Code:
osgviewer -p saved_animation.path demo1.earth



with my saved_animation.path containing(only area of concern are the first 
numbers of each line, the rest are coordinates,etc):

Code:
0 -2325407.84602605 -3773744.01822793 4620950.6465483 0.789763463262851 
-0.198065735037136 -0.0367132622717805 0.579392589763306

30 -2265729.64421162 -3667179.98272433 4731436.64144345 0.782981051316165 
-0.194916972743774 -0.0398361681693882 0.589373503579705






But the animation still takes 30 *realtime* seconds to complete, and does so in 
370 frames. here is my output:

Code:
....
366.000000
367.000000
368.000000
369.000000
AnimatonPath completed in 30.0006 seconds, completing 370 frames,
             average frame rate = 12.3331



Now with 12fps, I would expect the animation path to complete in 30frames 
/12fps = 2.5 seconds, while completing only 30 frames.

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





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

Reply via email to