Re: [osg-users] Question about osgViewer::View::EventHandlers

2010-03-10 Thread Robert Osfield
Hi Martin, On Tue, Mar 9, 2010 at 7:22 PM, Martin Beckett m...@mgbeckett.com wrote: On this topic, is there a way of having an eventHandler remove itself? I want a one-shot selection of a point. I can't call removeHandler(this) inside the handler and there is no callback function I can pass

Re: [osg-users] Question about osgViewer::View::EventHandlers

2010-03-09 Thread Martin Beckett
On this topic, is there a way of having an eventHandler remove itself? I want a one-shot selection of a point. I can't call removeHandler(this) inside the handler and there is no callback function I can pass to the handler to be triggered when handle() returns true. Any suggestions? Cheers,

Re: [osg-users] Question about osgViewer::View::EventHandlers

2009-05-15 Thread Mojtaba Fathi
Hi J-S I did what you suggested and now it's working fine. Thnaks for your help and explanation. Moji the Great --- On Thu, 5/14/09, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: From: Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Subject: Re: [osg-users] Question about

Re: [osg-users] Question about osgViewer::View::EventHandlers

2009-05-15 Thread Robert Osfield
HI Moji, On Thu, May 14, 2009 at 5:30 PM, Mojtaba Fathi modjta...@yahoo.com wrote: Also, there is no such removeEventHandler function in View class, which I think could help me to solve the problem. In the svn/trunk version and 2.9.x series there is an View::removeEventHandler()

Re: [osg-users] Question about osgViewer::View::EventHandlers

2009-05-15 Thread Mojtaba Fathi
Hi Robert Thanks for your comment, it would be very helpful. Regards Moji the Great --- On Fri, 5/15/09, Robert Osfield robert.osfi...@gmail.com wrote: From: Robert Osfield robert.osfi...@gmail.com Subject: Re: [osg-users] Question about osgViewer::View::EventHandlers To: OpenSceneGraph Users

Re: [osg-users] Question about osgViewer::View::EventHandlers

2009-05-14 Thread Jean-Sébastien Guay
Hi Moji, So is there any specific reason for using ref_ptr instead of observer_ptr in definition of osgViewer::View::EventHandlers? The viewer owns the event handlers, thus ref_ptr is the right choice. The normal usage of an event handler is: viewer-addEventHandler(new MyEventHandler);