[osg-users] osg::Viewer remove event handler
Michele Bosi
michele.bosi at gmail.com
Mon Apr 28 05:41:45 PDT 2008
In case anyone is interested here's my implementation of the
removeEventHandler(), it's a simple removal from the std::list used by
OSG, don't know if there are other interactions that one should take
care of though:
void removeEventHandler(osgGA::GUIEventHandler* eventHandler)
{
osgViewer::View::EventHandlers::iterator it =
std::find(_eventHandlers.begin(), _eventHandlers.end(), eventHandler);
if ( it != _eventHandlers.end() )
_eventHandlers.erase( it );
}
On Mon, Apr 28, 2008 at 2:08 PM, David Callu <ledocc at gmail.com> wrote:
> Hi Michele
>
>
> Other correct me if i am wrong, but I don't found any method to remove
> EventHandler from an osgViewer::View.
> Fell free to implement one :-).
>
> HTH
> David Callu
>
> 2008/4/28 Michele Bosi <michele.bosi at gmail.com>:
> >
> >
> >
> > Hello,
> > I need to remove an event handler added to a Viewer using
> > addEventHandler (osgGA::GUIEventHandler *eventHandler)
> > I expected to find something like "remove/delete/eraseEventHandler"
> > but couldn't find anything, how can I remove then an event handler?
> >
> > Thanks,
> > Michele
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
More information about the osg-users
mailing list