Hello all,
I've made a few minor adjustments to TrackballManipulator which I hope will
be merged into the collective. (By the way, it isn't clear to me if
potential changes should be sent just to Robert or to the list at large.
Please correct me if I did wrong.)
TrackballManipulator.cpp:
Line 77 in handle():
if (calcMovement()) us.requestRedraw();
This line can be removed. The calcMovement() method will always return
false because _ga_t1 is NULL due to the flushMouseEventStack() method on
line 75.
Line 233 in calcMovement():
if (dx==0 && dy==0) return false;
This line can also be removed. Comparing a floating point variable with
zero doesn't generally work and definitely doesn't in this case. The
calculation of dx and dy can now be moved down to the middle mouse button
and right mouse button branches.
Line 322:
const float TRACKBALLSIZE = 0.8f;
This value works well for osgviewer but is not ideal for most of my
applications. The comment suggests that the number is a hack. But I can't
invest brain-power into the ideal solution right now. Yet I would at least
like to be able to change the number from time to time. So I've changed
TRACKBALLSIZE to the member variable _trackballSize and added a getter and
setter.
-Mason
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
This archive was generated by hypermail 2.1.8 : Sun Jan 02 2005 - 20:31:33 PST