Hi all,
I have OSG codes in which I use <osgGA/GUIEventHandler> to handle keyboard events and I want to integrate my codes with VR Juggler.
Example:
MyEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
osgViewer::Viewer* viewer = dynamic_cast<osgViewer::Viewer*>(&aa);
switch(ea.getEventType())
{
case(osgGA::GUIEventAdapter::KEYDOWN):
{
switch(ea.getKey())
{
case osgGA::GUIEventAdapter::KEY_Down:
viewer->getCamera()->setClearColor(osg::Vec4f(1.0f, 1.0f, 1.0f, 1.0f) );
// do some actions
...
viewer.addEventHandler(myMyEventHandlerObject);
Do I need to throw away all codes related to event handling in my OSG codes and use instead gadget::KeyboardMouse::EventQueue like here:
https://groups.google.com/forum/?fromgroups=#!topic/vrjuggler-questions/QxPlgV9umPUMaia