Hi,

I'm seeing something strange with mouse wheel (SCROLL) events in 
GUIEventAdapter.  My app is a Qt app set up following the osgviewerQt example.  
I am trying to implement zooming with the mouse where the zoom follows the 
mouse cursor.  In some cases I want to zoom with mouse clicks, and in other 
cases I want to use the mouse wheel.  Zooming was not working correctly when I 
used the mouse wheel.  I noticed that for SCROLL events, the x and y min/max 
were always -1 / +1, which caused GUIEventAdapter::getX/Ynormalized() to return 
the wrong values.  So, I figured I would just use getX/Y() instead and use 
inverse viewport matrix to get the normalized device coordinates.  But, then I 
noticed I was still getting inconsistent values for the Y coordinate.  For a 
RELEASE event, the GUIEventAdapter has Y_INCREASING_DOWNWARDS for the y 
orientation, and getY() returns 0 in the top left corner of the window.  For a 
SCROLL event, it has Y_INCREASING_UPWARDS and getY() returns 0 in the bottom
  left corner.  Why are the two event types inconsistent?  Is there some 
attribute I am forgetting to set somewhere?   

I am using OSG 3.0.0 and Qt 4.7.

... 

Thank you!

Cheers,
Michael

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49332#49332





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to