corrected CylinderMode::Apply

This commit is contained in:
Paolo Cignoni 2008-02-26 18:00:41 +00:00
parent e4bed07afa
commit 38a5850163
1 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.28 2008/02/24 18:05:08 ponchio
Should work as before. I didn't test cylinder and other exotic modes.
Revision 1.27 2008/02/24 14:37:00 ponchio
Restored trackball functionality. Not very much tested, and code will need some
cleanup.
@ -299,7 +302,8 @@ void CylinderMode::Apply (Trackball * tb, Point3f new_point)
if(snap>0.0){
angle = ((angle<0)?-1:1)* floor((((angle<0)?-angle:angle)/snap)+0.5)*snap;
}
tb->track.rot = tb->last_track.rot * Quaternionf (angle,axis.Direction());
// tb->track.rot = tb->last_track.rot * Quaternionf (angle,axis.Direction());
tb->track.rot = Quaternionf (-angle,axis.Direction()) * tb->last_track.rot;
}
void CylinderMode::Draw(Trackball * tb){