How are you passing the events from the mouse to the OSG?
If you are using osgViewer::SimpleViewer then you can inject mouse scroll events by doing:
viewer->getEventQueue()->mouseScroll2D(x,y);
These events don't map to mouse x,y coords though, but separate scroll values. The osgGA::TrackballManipulator just looks at mouse coords. You could of course treat the mouse scroll x,y as a mouse x,y if which case you'd just call EventQueue::mouseMotion(x,y).
Robert.
On 11/15/06, E. Wing <[EMAIL PROTECTED]> wrote:
So I have a nifty Apple Mighty Mouse which I would like to exploit. It
has a little scrollball instead of a scrollwheel. I was thinking it
would make for a poor-man's spaceball.
So looking over the APIs, I see that there is a mouseScroll2D(float x,
float y) API which rests among the other mouse APIs like mouseMotion
and mouseButtonPress. I presume this is the API I'm after so I tried
dropping in mouseScroll2D into my code, but nothing seems to be
happening.
I checked my windowing system events. I get returned a deltaX and
deltaY for my scroll events which I pass to mouseScroll2D, but nothing
happens with the viewer.
My camera manipulator is set to an osgGA::TrackballManipulator. The
mouse button and mouse motion events do work for me.
What am I missing?
Thanks,
Eric
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
