Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r2274 - trunk/UserInterface


Chronological Thread 
  • From: roni@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r2274 - trunk/UserInterface
  • Date: Wed, 28 May 2008 11:24:16 -0600 (MDT)

Author: roni
Date: Wed May 28 11:24:13 2008
New Revision: 2274

Modified:
   trunk/UserInterface/XWindowUI.cc
   trunk/UserInterface/XWindowUI.h
Log:
UserInterface/XWindowUI.cc
UserInterface/XWindowUI.h:

-Adding "invert mouse" option in game mode, for those of us with that
particular genetic anomaly.  Use "-invert" and "-game" and then
pulling back on the mouse while holding the right button will make the
camera tilt up instead of down.

Modified: trunk/UserInterface/XWindowUI.cc
==============================================================================
--- trunk/UserInterface/XWindowUI.cc    (original)
+++ trunk/UserInterface/XWindowUI.cc    Wed May 28 11:24:13 2008
@@ -114,6 +114,9 @@
       double speed = 50.0;
       getDoubleArg(i, args, speed);
       translate_speed = speed;
+      invert = 1.0;
+    } else if (arg=="-invert"){
+      invert = -1.0;
     } else if (arg=="-quit") {
       quit=true;
     }
@@ -996,8 +999,8 @@
     ias.last_y = mouse_y;
   } else {
     XWindow* window = windows[channel];
-    Real xmotion = Real(ias.last_x-mouse_x)/window->xres;
-    Real ymotion = Real(ias.last_y-mouse_y)/window->yres;
+    Real xmotion = invert*Real(ias.last_x-mouse_x)/window->xres;
+    Real ymotion = invert*Real(ias.last_y-mouse_y)/window->yres;
     Vector rotation(xmotion*rotate_speed, ymotion*rotate_speed, 0);
     Vector translation(0, 0, 0);
     Camera* camera = rtrt_interface->getCamera(channel);

Modified: trunk/UserInterface/XWindowUI.h
==============================================================================
--- trunk/UserInterface/XWindowUI.h     (original)
+++ trunk/UserInterface/XWindowUI.h     Wed May 28 11:24:13 2008
@@ -168,6 +168,7 @@
     // Interaction parameters
     Real fov_speed;
     Real translate_speed;
+    Real invert;
     Real dolly_speed;
     Real rotate_speed;
     Real autoview_fov;


  • [Manta] r2274 - trunk/UserInterface, roni, 05/28/2008

Archive powered by MHonArc 2.6.16.

Top of page