Thanks, Serge. Odd, I thought that the default behavior was that handled
events did _not_ filter on to subordinate handlers. I must've been mistaken.
For the archives, I found that I can also add the following to my custom
MatrixManipulator:
setIgnoreHandledEventsMask(
osgGA::GUIEventAdapter::DRAG
);
This causes the events passed in (it's a bitmask) to be ignored and not
passed to the handle() method.
Either solution (yours or mine) works, but I think I'll go with yours.
Thanks again for the fast response.
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/>
+1 303 859 9466
________________________________
From: [email protected]
[mailto:[email protected]] On Behalf Of Serge Lages
Sent: Monday, May 11, 2009 10:40 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Mixing event callbacks and camera manipulators
Hi Paul,
Have you checked the following in your custom manipulator :
if (ea.getHandled()) return false;
Each event handler needs to check itself (or not) this variable to know if
it needs to handle the event.
Hope this helps.
Cheers,
On Mon, May 11, 2009 at 6:32 PM, Paul Martz <[email protected]> wrote:
Hi Robert and others -- I'm pretty good with OpenGL and 3D stuff,
but when it comes to GUI interactions I'm a little week. I'm hoping someone
can give me some pointers on what I might be doing wrong here.
I've got an event callback attached to some node in my scene graph
that looks for DRAG events. It returns true when it handles one so that the
camera manipulator doesn't also attempt to handle the DRAG.
This works great when I have a TrackballManipulator set as the
Viewer's CameraManipulator. However, if I switch over to a custom
MatrixManipulator that I've created, the event appears to get passed to my
custom manipulator and it. too, processes the DRAG event -- even though my
event callback is returning true.
Like I said, the TrackballManipulator properly ignores the DRAG, so
the problem must be in my custom matrix manipulator (and not in my event
callback).
Any idea what I might be doing wrong?
Sorry this is so open-ended. I'm hoping someone else has encountered
something similar and can reply from experience.
Thanks,
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/>
+1 303 859 9466
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
Serge Lages
http://www.tharsis-software.com
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org