first attempt to correct after quaternion ToMatrix() inversion (does not work yet)

This commit is contained in:
Paolo Cignoni 2008-02-22 18:57:47 +00:00
parent 6b3726ef90
commit 228db666c3
2 changed files with 9 additions and 2 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.24 2007/12/21 12:29:34 tarini
*** empty log message ***
Revision 1.23 2007/10/12 14:02:39 corsini
solve memory leak in dtor
@ -194,7 +197,7 @@ void Trackball::Translate(Point3f tr)
{
Matrix44f m;
track.rot.ToMatrix(m);
track.tra = last_track.tra + Inverse(m)*tr/track.sca;
track.tra = last_track.tra + m*tr/track.sca;
}
/***************************************************************/

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.8 2008/02/15 20:54:45 benedetti
removed some variable initialization related warning
Revision 1.7 2007/10/22 14:39:54 cignoni
corrected bug into the drawsphere (thanks to nico and guido!)
@ -668,7 +671,8 @@ void DrawSphereIcon (Trackball * tb,bool active)
glScale (tb->radius);
Matrix44f r;
tb->track.rot.ToMatrix (r);
glMultMatrix (r);
glMultMatrix (Inverse(r));
float amb[4] = { .3f, .3f, .3f, 1.0f };
float col[4] = { .5f, .5f, .8f, 1.0f };