Esempio n. 1
0
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));
}
Esempio n. 2
0
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));
}
Esempio n. 3
0
void Trackball::mouseUp(int x, int y)
{
	int button = 1;//TEMP
	_tbStopMotion(button, (int)(1000*clock()/CLOCKS_PER_SEC));
}