Hi Drew, You are free to subclass from osgViewer::Viewer or just call things in the order you want to call them - if what frame() does support what you want you can always just call each stage separately.
As for you particular need to change the simulation time, I'd suggest having your main loop have a simulation time controller that the event handler has a pointer to, the event handler would then tweak the controls of the simulation time controller object. This could all be done without any mods of osgViewer::Viewer. The only downside would be a frames latency in see the changes in the simulation time, however, when running at 60Hz we are only talking 16ms day so its hardly something to worry about. Robert. On 2/2/07, Drew Whitehouse <[EMAIL PROTECTED]> wrote:
Hi Robert, I'm wondering about the logic of the osgViewer::frame() method. I have a key event handler that wants to influence the simulation time (eg a "pause" key that fixes simulation time), but advance() takes place before the events are handled. Would it make more sense to have the advance() after the eventTraversal and before the updateTraversal ? Perhaps it needs to be broken up such that advance_viewer() and advance_simulation(double simulationTime) surround the eventTraversal() call. advance_viewer() would then take care of viewer house keeping of things like ReferenceTime and Stats. Of course this is something that can be overridden but perhaps it's a common enough usage that it would be worth putting into the existing frame() ? -Drew -- Drew Whitehouse ANU Supercomputer Facility Vizlab _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
