51 virtual bool handleMousePressEvent( QMouseEvent* event,
52 const Qt::MouseButtons& buttons,
53 const Qt::KeyboardModifiers& modifiers,
56 virtual bool handleMouseReleaseEvent( QMouseEvent* event );
58 virtual bool handleMouseMoveEvent( QMouseEvent* event,
59 const Qt::MouseButtons& buttons,
60 const Qt::KeyboardModifiers& modifiers,
63 virtual bool handleWheelEvent( QWheelEvent* event,
64 const Qt::MouseButtons& buttons,
65 const Qt::KeyboardModifiers& modifiers,
69 virtual bool handleKeyPressEvent( QKeyEvent* event,
72 virtual bool handleKeyReleaseEvent( QKeyEvent* event,
83 virtual void updateCamera();
98 void setCameraSensitivity( Scalar sensitivity );
99 void setCameraFov( Scalar fov );
100 void setCameraFovInDegrees( Scalar fov );
101 void setCameraZNear( Scalar zNear );
102 void setCameraZFar( Scalar zFar );
106 void mapCameraBehaviourToAabb(
const Core::Aabb& aabb );
109 void unmapCameraBehaviourToAabb();
112 virtual void fitScene(
const Core::Aabb& aabb ) = 0;
127 return { ( mouseEvent->pos().x() - m_lastMouseX ) / m_camera->getWidth(),
128 ( mouseEvent->pos().y() - m_lastMouseY ) / m_camera->getHeight() };
132 Scalar m_lastMouseX { 0_ra };
135 Scalar m_lastMouseY { 0_ra };
138 Scalar m_cameraSensitivity { 1_ra };
140 Scalar m_quickCameraModifier { 1_ra };
142 Scalar m_wheelSpeedModifier { 0.02_ra };
145 Scalar m_targetedAabbVolume { 0_ra };
146 bool m_mapCameraBahaviourToAabb {
false };
151 Core::Vector3 m_target { 0_ra, 0_ra, 0_ra };