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

follow initial scale/translate/rotate options

parent 190a3ddd
No related branches found
No related tags found
No related merge requests found
......@@ -70,12 +70,12 @@ void drawContext::load(std::string filename)
// open the file with Gmsh
GmshOpenProject(filename);
// reset openGL view
eventHandler(10);
// run onelab clients to populate the database
onelab_cb("check");
// set openGL view using CTX options
eventHandler(8);
// mark all parameters as changed to force complete first run
onelab::server::instance()->setChanged(3);
}
......@@ -133,6 +133,16 @@ void drawContext::eventHandler(int event, float x, float y)
case 7: // Z view
setQuaternion(0., 0., 0., 1.);
break;
case 8: // CTX options
for(int i = 0; i < 3; i++){
_translate[i] = CTX::instance()->tmpTranslation[i];
_scale[i] = CTX::instance()->tmpScale[i];
}
setQuaternion(CTX::instance()->tmpQuaternion[0],
CTX::instance()->tmpQuaternion[1],
CTX::instance()->tmpQuaternion[2],
CTX::instance()->tmpQuaternion[3]);
break;
default: // all other reset the position
setQuaternion(0., 0., 0., 1.);
for(int i = 0; i < 3; i++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment