Reversed the direction of wheel scaling and added middle mouse panning

This commit is contained in:
Paolo Cignoni 2006-07-26 13:54:45 +00:00
parent 5f842ad53e
commit 94f8e5f4d5
2 changed files with 12 additions and 1 deletions

View File

@ -24,6 +24,13 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.15 2006/02/13 13:15:52 cignoni
Added Scale and Translate methods.
Added many drawing hints and raised the default num. of steps when drawing circles.
Added MouseDown without coords (for remembering changes of keys modifiers)
Added ZMode to the default modes under Alt+left
Added DrawPostApply (to be completed)
Revision 1.14 2005/10/17 01:29:46 cignoni Revision 1.14 2005/10/17 01:29:46 cignoni
Main restructuring. Removed the Draw function and slightly changed the meaning of the trackball itself. Main restructuring. Removed the Draw function and slightly changed the meaning of the trackball itself.
See the notes at the beginning of trackball.h See the notes at the beginning of trackball.h
@ -90,6 +97,7 @@ Trackball::Trackball(): current_button(0), current_mode(NULL),
modes[0] = NULL; modes[0] = NULL;
modes[BUTTON_LEFT] = new SphereMode(); modes[BUTTON_LEFT] = new SphereMode();
modes[BUTTON_LEFT | KEY_CTRL] = new PlaneMode(Plane3f(0, Point3f(1, 0, 0))); modes[BUTTON_LEFT | KEY_CTRL] = new PlaneMode(Plane3f(0, Point3f(1, 0, 0)));
modes[BUTTON_MIDDLE] = new PlaneMode(Plane3f(0, Point3f(1, 0, 0)));
modes[BUTTON_LEFT | KEY_SHIFT] = new ScaleMode(); modes[BUTTON_LEFT | KEY_SHIFT] = new ScaleMode();
modes[BUTTON_LEFT | KEY_ALT ] = new ZMode(); modes[BUTTON_LEFT | KEY_ALT ] = new ZMode();
modes[WHEEL] = new ScaleMode(); modes[WHEEL] = new ScaleMode();

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.16 2006/02/13 13:10:27 cignoni
Added Zmode for moving objects along the perpendicular to the viewplane
Revision 1.15 2006/01/12 15:40:05 cignoni Revision 1.15 2006/01/12 15:40:05 cignoni
Corrected small bugs on rotating after scaling+translating Corrected small bugs on rotating after scaling+translating
changed void PlaneMode::Apply and void SphereMode::Apply changed void PlaneMode::Apply and void SphereMode::Apply
@ -83,7 +86,7 @@ using namespace vcg;
void TrackMode::Apply(Trackball *trackball, float WheelNotch) { void TrackMode::Apply(Trackball *trackball, float WheelNotch) {
trackball->track.sca*=pow(1.2f,WheelNotch); trackball->track.sca*=pow(1.2f,-WheelNotch);
} }
void ScaleMode::Apply(Trackball *tb, Point3f new_point) { void ScaleMode::Apply(Trackball *tb, Point3f new_point) {