void mouse(int btn, int state, int x, int y) { int mod = glutGetModifiers(); if(btn==GLUT_LEFT_BUTTON && state == GLUT_DOWN) axis = 0; if(mod&GLUT_ACTIVE_CTRL &&btn==GLUT_LEFT_BUTTON && state == GLUT_DOWN) axis = 1; if(btn==GLUT_RIGHT_BUTTON && state == GLUT_DOWN) axis = 2;
theta[axis] += 2.0; if( theta[axis] > 360.0 ) theta[axis] -= 360.0; display();
} 尝试了加入 GLUT_UP 判断,但是没用