Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void cScene::MouseMove(int x, int y) {
- double windowWidth = glutGet(GLUT_WINDOW_WIDTH);
- double windowHeight = glutGet(GLUT_WINDOW_HEIGHT);
- double WHratio = windowWidth / windowHeight;
- double xU = WHratio*(xmin + x / windowWidth * (xmax - xmin)) ;
- //double yU = ymax - y / windowHeight * (ymax - ymin);
- obiekty[1]->MoveTo(xU,obiekty[1]->ZwracajY());
- }
- void MouseMoveCallback(int x, int y)
- {
- scena.MouseMove(x, y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement