From d9d019f03b6475cb8b0ac0e84151cb26b9bc7629 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 8 Dec 2005 18:14:46 +0000 Subject: [PATCH] little hack for philou: clicking on "Z" while holding "Shift" will cycle through 90 degrees increments of rotations around the Z-axis --- Fltk/Callbacks.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 1c5eaa29a1..69288fc1eb 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.382 2005-12-01 04:55:13 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.383 2005-12-08 18:14:46 geuzaine Exp $ // // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle // @@ -400,9 +400,13 @@ void status_xyz1p_cb(CALLBACK_ARGS) Draw(); } else if(!strcmp(str, "z")){ // Z pointing out of the screen - CTX.r[0] = 0.; - CTX.r[1] = 0.; - CTX.r[2] = 0.; + if(!Fl::event_state(FL_SHIFT)){ + CTX.r[0] = 0.; + CTX.r[1] = 0.; + CTX.r[2] = 0.; + } + else + CTX.r[2] += 90.; // little hack for philou CTX.setQuaternionFromEulerAngles(); Draw(); } -- GitLab