void drag(int x, int y) { Vec2f newmouse; cam.transform_mouse(x, y, newmouse.v); //double newmousetime=get_time_in_seconds(); oldmouse=newmouse; //oldmousetime=newmousetime; }
void drag(int x, int y) { Vec2f newmouse; cam.transform_mouse(x, y, newmouse.v); double newmousetime=get_time_in_seconds(); Gluvi::camera->drag( x, y ); oldmouse=newmouse; oldmousetime=newmousetime; }
void mouse(int button, int state, int x, int y) { Vec2f newmouse; cam.transform_mouse(x, y, newmouse.v); double newmousetime=get_time_in_seconds(); oldmouse=newmouse; oldmousetime=newmousetime; Gluvi::camera->click( button, state, x, y ); glutPostRedisplay(); }