void keyCallback(int key, int action) { if( gEngine->isMaster() ) { switch( key ) { case 'S': if(action == SGCT_PRESS) stats.toggle(); break; case 'I': if(action == SGCT_PRESS) info.toggle(); break; case 'L': if(action == SGCT_PRESS) light.toggle(); break; case 'W': if(action == SGCT_PRESS) wireframe.toggle(); break; case 'Q': if(action == SGCT_PRESS) gEngine->terminate(); break; case 'P': case SGCT_KEY_F10: if(action == SGCT_PRESS) takeScreenshot.setVal( true ); break; case SGCT_KEY_UP: arrowButtons[FORWARD] = ((action == SGCT_REPEAT || action == SGCT_PRESS) ? true : false); break; case SGCT_KEY_DOWN: arrowButtons[BACKWARD] = ((action == SGCT_REPEAT || action == SGCT_PRESS) ? true : false); break; } } }
void keyCallback(int key, int action) { if (gEngine->isMaster()) { switch (key) { case SGCT_KEY_S: if (action == SGCT_PRESS) stats.toggle(); break; case SGCT_KEY_I: if (action == SGCT_PRESS) info.toggle(); break; /*case SGCT_KEY_SPACE: if (action == SGCT_PRESS) transfer.setVal(true); break;*/ } } }
void keyCallback(int key, int action) { if( gEngine->isMaster() ) { switch( key ) { case 'S': if(action == SGCT_PRESS) stats.toggle(); break; case 'I': if(action == SGCT_PRESS) info.toggle(); break; case 'W': if(action == SGCT_PRESS) wireframe.toggle(); break; case 'Q': if(action == SGCT_PRESS) gEngine->terminate(); break; case 'T': if(action == SGCT_PRESS) useTracking.toggle(); break; case 'E': if(action == SGCT_PRESS) { glm::dmat4 xform = glm::translate( glm::dmat4(1.0), glm::dvec3(0.0f, 0.0f, 4.0f) ); sgct_core::ClusterManager::instance()->getDefaultUserPtr()->setTransform(xform); } break; case SGCT_KEY_SPACE: if(action == SGCT_PRESS) mPause = !mPause; break; case 'F': if(action == SGCT_PRESS) for(std::size_t i=0; i<gEngine->getNumberOfWindows(); i++) { gEngine->getWindowPtr(i)->setUseFXAA( !gEngine->getWindowPtr(i)->useFXAA() ); } break; case 'P': case SGCT_KEY_F10: if(action == SGCT_PRESS) takeScreenshot.setVal( true ); break; case 'R': if(action == SGCT_PRESS) reloadShaders.setVal(true); break; } } }