bool handleMouseEvent(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa) { bool handled = ea.getHandled(); if(handled) return true; // process mouse event ... // mark event as handled ea.setHandled(true); return true; }
osgGA::GUIEventAdapter event; event.setHandled(false); bool handled = event.getHandled();In this example, we are creating a new GUIEventAdapter object and setting its handled property to false. We then check whether the event has been handled or not, and the value of the handled variable will be false. Package library: OpenSceneGraph (OSG)