From 86bf1f6d7bbdfd034acfc174736ce554dd25f015 Mon Sep 17 00:00:00 2001 From: ponchio Date: Tue, 26 Feb 2008 18:46:55 +0000 Subject: [PATCH] Fixed bug in drawing position of the trackball when changin center. --- wrap/gui/trackutils.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wrap/gui/trackutils.h b/wrap/gui/trackutils.h index 01b4afaa..84be841c 100644 --- a/wrap/gui/trackutils.h +++ b/wrap/gui/trackutils.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.12 2008/02/24 18:10:54 ponchio +Fixed scale behaviour. + Revision 1.11 2008/02/24 18:05:08 ponchio Should work as before. I didn't test cylinder and other exotic modes. @@ -681,7 +684,11 @@ void DrawSphereIcon (Trackball * tb,bool active) glPushAttrib (GL_TRANSFORM_BIT |GL_ENABLE_BIT | GL_LINE_BIT | GL_CURRENT_BIT | GL_LIGHTING_BIT); glMatrixMode(GL_MODELVIEW); glPushMatrix (); - Point3f center = tb->center + tb->track.InverseMatrix()*tb->center; +/* Matrix44f rot; + tb->track.rot.ToMatrix(rot); + Invert(rot);*/ +// Point3f center = tb->center + tb->track.InverseMatrix()*tb->center; + Point3f center = tb->center + tb->track.InverseMatrix()*Point3f(0, 0, 0); glTranslate(center); glScale (tb->radius/tb->track.sca);