void CTrackball::tbMouse(int button, int state, int x, int y) { if (state == GLUT_DOWN && button == tb_button) _tbStartMotion(x, y, button, glutGet(GLUT_ELAPSED_TIME)); else if (state == GLUT_UP && button == tb_button) _tbStopMotion(button, glutGet(GLUT_ELAPSED_TIME)); }
void tbMouse(int button, int state, int x, int y) { assert(tb_button != -1); if (state == GLUT_DOWN) _tbStartMotion(x, y, button, glutGet(GLUT_ELAPSED_TIME)); else if (state == GLUT_UP) _tbStopMotion(button, glutGet(GLUT_ELAPSED_TIME)); }
void Trackball::mouseUp(int x, int y) { int button = 1;//TEMP _tbStopMotion(button, (int)(1000*clock()/CLOCKS_PER_SEC)); }