Skip to content
Snippets Groups Projects
Commit fa1dda02 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Correction of trackball for X, Y, Z positions (again...)

parent 35d330a1
No related branches found
No related tags found
No related merge requests found
/* $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 "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -459,7 +459,7 @@ void InputCb (Widget w, XtPointer client_data, GLwDrawingAreaCallbackStruct *cb) ...@@ -459,7 +459,7 @@ void InputCb (Widget w, XtPointer client_data, GLwDrawingAreaCallbackStruct *cb)
if(Modifier && !ZoomClick){ if(Modifier && !ZoomClick){
Modifier = 0; Modifier = 0;
if(CTX.useTrackball){ if(CTX.useTrackball){
CTX.setQuaternion(0.,0.,0.,0.); CTX.setQuaternion(0.,0.,0.,1.);
} }
else{ else{
set_r(0,0.); set_r(1,0.); set_r(2,0.); set_r(0,0.); set_r(1,0.); set_r(2,0.);
......
/* $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 "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -104,13 +104,13 @@ void OptionsCb (Widget w, XtPointer client_data, XtPointer call_data){ ...@@ -104,13 +104,13 @@ void OptionsCb (Widget w, XtPointer client_data, XtPointer call_data){
break; break;
case OPTIONS_YVIEW : case OPTIONS_YVIEW :
if(CTX.useTrackball) 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.); set_r(0,-90.);set_r(1,0.); set_r(2,0.);
Init(); Draw(); Init(); Draw();
break; break;
case OPTIONS_ZVIEW : case OPTIONS_ZVIEW :
if(CTX.useTrackball) 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.); set_r(0,0.); set_r(1,0.); set_r(2,0.);
Init(); Draw(); Init(); Draw();
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment