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.

freeflycamera.h 608B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef FREEFLYCAMERA_H
  2. #define FREEFLYCAMERA_H
  3. #include "cameras/abstractcamera.h"
  4. #include "utils/vector3d.h"
  5. class FreeFlyCamera : public AbstractCamera
  6. {
  7. public:
  8. FreeFlyCamera(UGameEngine* engine, QWidget *widget);
  9. virtual void mouseMoveEvent(QMouseEvent* event);
  10. virtual void keyPressEvent(QKeyEvent* event);
  11. virtual void keyReleaseEvent(QKeyEvent* event);
  12. virtual void updateLookAt();
  13. void rotate(float phi, float theta);
  14. private:
  15. Vector2D _speedVector;
  16. double _speed;
  17. double _phi;
  18. double _theta;
  19. QPoint _lastPoint;
  20. };
  21. #endif // FREEFLYCAMERA_H