void mouseFunc(int state, int button, int _x , int _y) { if ( button == GLUT_LEFT_BUTTON ) arcball.startRotation(_x,_y); else arcball.stopRotation(); glutPostRedisplay(); }
void mouseFunc(int state, int button, int _x , int _y) { if ( button == GLUT_LEFT_BUTTON ) arcball.startRotation(_x,_y); else arcball.stopRotation(); if ( button == GLUT_RIGHT_BUTTON ) rightPressed=true; else rightPressed=false; glutPostRedisplay(); }
void mouseFunc(int state, int button, int _x , int _y) { if ( button == GLUT_LEFT_BUTTON ) arcball.startRotation(_x,_y); else arcball.stopRotation(); if ( state == 3 ) { //eyeZ+=0.1; alpha+=0.01; cerr << alpha << endl; } if (state ==4) { //eyeZ-=0.1; alpha-=0.01; cerr << alpha << endl; } glutPostRedisplay(); }