first attempt to correct after quaternion ToMatrix() inversion (does not work yet)
This commit is contained in:
parent
6b3726ef90
commit
228db666c3
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$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
|
Revision 1.23 2007/10/12 14:02:39 corsini
|
||||||
solve memory leak in dtor
|
solve memory leak in dtor
|
||||||
|
|
||||||
|
|
@ -194,7 +197,7 @@ void Trackball::Translate(Point3f tr)
|
||||||
{
|
{
|
||||||
Matrix44f m;
|
Matrix44f m;
|
||||||
track.rot.ToMatrix(m);
|
track.rot.ToMatrix(m);
|
||||||
track.tra = last_track.tra + Inverse(m)*tr/track.sca;
|
track.tra = last_track.tra + m*tr/track.sca;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$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
|
Revision 1.7 2007/10/22 14:39:54 cignoni
|
||||||
corrected bug into the drawsphere (thanks to nico and guido!)
|
corrected bug into the drawsphere (thanks to nico and guido!)
|
||||||
|
|
||||||
|
|
@ -668,7 +671,8 @@ void DrawSphereIcon (Trackball * tb,bool active)
|
||||||
glScale (tb->radius);
|
glScale (tb->radius);
|
||||||
Matrix44f r;
|
Matrix44f r;
|
||||||
tb->track.rot.ToMatrix (r);
|
tb->track.rot.ToMatrix (r);
|
||||||
glMultMatrix (r);
|
|
||||||
|
glMultMatrix (Inverse(r));
|
||||||
|
|
||||||
float amb[4] = { .3f, .3f, .3f, 1.0f };
|
float amb[4] = { .3f, .3f, .3f, 1.0f };
|
||||||
float col[4] = { .5f, .5f, .8f, 1.0f };
|
float col[4] = { .5f, .5f, .8f, 1.0f };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue