From 0e8c2ef89b791fab51df92d6a20ad585e7db0088 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Sun, 14 Oct 2001 05:14:37 +0000 Subject: [PATCH] Quick 'n dirty fix to TrackballManipulator to get the rotations doing the right things after the Quat fixes. --- src/osgUtil/TrackballManipulator.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/osgUtil/TrackballManipulator.cpp b/src/osgUtil/TrackballManipulator.cpp index e62ed88d2..d0c884d6b 100644 --- a/src/osgUtil/TrackballManipulator.cpp +++ b/src/osgUtil/TrackballManipulator.cpp @@ -178,7 +178,7 @@ bool TrackballManipulator::calcMovement() // return if less then two events have been added. if (_ga_t0.get()==NULL || _ga_t1.get()==NULL) return false; - float dx = dx = _ga_t0->getX()-_ga_t1->getX(); + float dx = _ga_t0->getX()-_ga_t1->getX(); float dy = _ga_t0->getY()-_ga_t1->getY(); // return if there is no movement. @@ -325,7 +325,14 @@ void TrackballManipulator::trackball(osg::Vec3& axis,float& angle, float p1x, fl /* * Now, we want the cross product of P1 and P2 */ - axis = p1^p2; + +// Robert, +// +// This was the quick 'n' dirty fix to get the trackball doing the right +// thing after fixing the Quat rotations to be right-handed. You may want +// to do something more elegant. +// axis = p1^p2; +axis = p2^p1; axis.normalize(); /*