Hi Tom, The EventQueue's CurrentEventState is a event state tracker that is used to populate new events with current settings such as mouse position, buttons pressed. This is done as events coming in from windowing toolkits are specific to the event type.
If you want to pass events on then you'll need to get the events from event queue using either EventQueue::takeEvents(Events&) or EventQueue::copyEvents(Events&). Robert. On Sat, Jul 17, 2010 at 2:44 AM, Tom Pearce <[email protected]> wrote: > Hi, > > I'm looking to implement event handling in a handler not attached to a View. > The code snippet below is what I'm thinking of doing (the function would take > an eventadapter similar to the handle method of the camera manipulators). Is > this a valid way to go, or am I missing something? If multiple events > accrue, do I have access to those through getCurrentEventState(), or just the > most recent? Or am I thinking about this entirely wrong? > > > Code: > osgViewer::Viewer v; > while(!v.done()) > { > v.frame(); > MyEventHandlerFunctionOrClass(v.getEventQueue()->getCurrentEventState()) > } > > > > Thank you! > > Cheers, > Tom > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=30088#30088 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

