Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. void cScene::MouseMove(int x, int y) {
  2. double windowWidth = glutGet(GLUT_WINDOW_WIDTH);
  3. double windowHeight = glutGet(GLUT_WINDOW_HEIGHT);
  4. double WHratio = windowWidth / windowHeight;
  5.  
  6. double xU = WHratio*(xmin + x / windowWidth * (xmax - xmin)) ;
  7. //double yU = ymax - y / windowHeight * (ymax - ymin);
  8. obiekty[1]->MoveTo(xU,obiekty[1]->ZwracajY());
  9. }
  10.  
  11.  
  12. void MouseMoveCallback(int x, int y)
  13. {
  14. scena.MouseMove(x, y);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement