Stephen Northcott schrieb:
Hello all,

I am still working on this cross platform port from my OS X app to Windows XP..

On my Mac I am spoiled by having a Mighty Mouse with four direction scroll ball, instead of a scroll wheel, and have incorporated that into my app on OS X. I use it for movement and panning in the Scene View.

I assumed that on the PC I would only get scroll wheel functionality.
However whilst the callbacks I am using register that some kind of scrolling is going on on the PC, I don't get any valid values from the scroll deltas returned....

I am using 'osgGA::GUIEventAdapter::SCROLL' to register the scroll wheel / scroll ball movement, in a callback.
I then use getScrollingDeltaX , ..DeltaY to read the wheel / ball.

As I have said, on both platforms with the code unchanged I register that the scroll wheel is being used, but only on the Mac do I get anything other than 0 values from the get functions..

There are two different kinds of scroll-events in Producer/osgGA:

1.) getScrollingDeltaX / getScrollinDeltaY for Input devices which support measurements of the scrolling (the devices are capable to return the amount of scrolling-delta, not only the direction) I think this is apple-only (MightyMouse and the PowerBook/MacBook trackpads), I don't know if you can use the MightyMouse to scroll horizontally under windows.

2.) getScrollMotion for all the other input devices with scroll-wheel. theses devices only report the direction of the scroll, not the amount. This is the windows-way and most of the mouses with scroll-wheel report that back.

So for your code:

use getScrollingDeltaX / getScrollingDeltaY for the MightyMouse + the trackpad on Mac OSX and getScrollingMotion for windows and all the other scrool-wheel-mouses. (on mac os x you have support for graphics tablets, too ;)

Perhaps we should document the difference a bit better.

HTH,
Stephan
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to