You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rotationcamera.h 642B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef ROTATIONCAMERA_H
  2. #define ROTATIONCAMERA_H
  3. #include "abstractcamera.h"
  4. class RotationCamera : public AbstractCamera
  5. {
  6. public:
  7. RotationCamera(UGameEngine* engine, QWidget *widget, double radius, double phi, double theta);
  8. virtual void mousePressEvent(QMouseEvent* event);
  9. virtual void mouseMoveEvent(QMouseEvent* event);
  10. virtual void wheelEvent(QWheelEvent* event);
  11. virtual void keyPressEvent(QKeyEvent* event);
  12. virtual void updateLookAt();
  13. void rotate(float phi, float theta);
  14. private:
  15. double _radius;
  16. double _phi;
  17. double _theta;
  18. QPoint _lastPoint;
  19. };
  20. #endif // ROTATIONCAMERA_H