From 94f8e5f4d5726943838e538e54ac8cb2df13c2a1 Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 26 Jul 2006 13:54:45 +0000 Subject: [PATCH] Reversed the direction of wheel scaling and added middle mouse panning --- wrap/gui/trackball.cpp | 8 ++++++++ wrap/gui/trackmode.cpp | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/wrap/gui/trackball.cpp b/wrap/gui/trackball.cpp index 5aac85da..78d1cbc4 100644 --- a/wrap/gui/trackball.cpp +++ b/wrap/gui/trackball.cpp @@ -24,6 +24,13 @@ History $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 Main restructuring. Removed the Draw function and slightly changed the meaning of the trackball itself. 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[BUTTON_LEFT] = new SphereMode(); 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_ALT ] = new ZMode(); modes[WHEEL] = new ScaleMode(); diff --git a/wrap/gui/trackmode.cpp b/wrap/gui/trackmode.cpp index 9a47ecfe..4fbb12d0 100644 --- a/wrap/gui/trackmode.cpp +++ b/wrap/gui/trackmode.cpp @@ -24,6 +24,9 @@ History $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 Corrected small bugs on rotating after scaling+translating changed void PlaneMode::Apply and void SphereMode::Apply @@ -83,7 +86,7 @@ using namespace vcg; 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) {