From fa1dda0280872ef29a2c87ff6c8ba6e1c2842f01 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 22 Dec 2000 20:08:20 +0000 Subject: [PATCH] Correction of trackball for X, Y, Z positions (again...) --- Unix/CbInput.cpp | 4 ++-- Unix/CbOptions.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Unix/CbInput.cpp b/Unix/CbInput.cpp index 15463188ad..6771a645e1 100644 --- a/Unix/CbInput.cpp +++ b/Unix/CbInput.cpp @@ -1,4 +1,4 @@ -/* $Id: CbInput.cpp,v 1.13 2000-12-22 17:01:39 geuzaine Exp $ */ +/* $Id: CbInput.cpp,v 1.14 2000-12-22 20:08:20 geuzaine Exp $ */ #include "Gmsh.h" #include "GmshUI.h" @@ -459,7 +459,7 @@ void InputCb (Widget w, XtPointer client_data, GLwDrawingAreaCallbackStruct *cb) if(Modifier && !ZoomClick){ Modifier = 0; if(CTX.useTrackball){ - CTX.setQuaternion(0.,0.,0.,0.); + CTX.setQuaternion(0.,0.,0.,1.); } else{ set_r(0,0.); set_r(1,0.); set_r(2,0.); diff --git a/Unix/CbOptions.cpp b/Unix/CbOptions.cpp index d97dfff162..27c05d8cb5 100644 --- a/Unix/CbOptions.cpp +++ b/Unix/CbOptions.cpp @@ -1,4 +1,4 @@ -/* $Id: CbOptions.cpp,v 1.16 2000-12-22 17:01:39 geuzaine Exp $ */ +/* $Id: CbOptions.cpp,v 1.17 2000-12-22 20:08:20 geuzaine Exp $ */ #include "Gmsh.h" #include "GmshUI.h" @@ -104,13 +104,13 @@ void OptionsCb (Widget w, XtPointer client_data, XtPointer call_data){ break; case OPTIONS_YVIEW : if(CTX.useTrackball) - CTX.setQuaternion(1./sqrt(2.),0.,1./sqrt(2.),0.); + CTX.setQuaternion(1./sqrt(2.),0.,0.,1./sqrt(2.)); set_r(0,-90.);set_r(1,0.); set_r(2,0.); Init(); Draw(); break; case OPTIONS_ZVIEW : if(CTX.useTrackball) - CTX.setQuaternion(0.,0.,0.,0.); + CTX.setQuaternion(0.,0.,0.,1.); set_r(0,0.); set_r(1,0.); set_r(2,0.); Init(); Draw(); break; -- GitLab