2#include <Gui/RaGui.hpp>
4#include <Core/Asset/Camera.hpp>
5#include <Engine/Scene/CameraComponent.hpp>
6#include <Gui/Viewer/CameraManipulator.hpp>
28 bool handleMousePressEvent( QMouseEvent* event,
29 const Qt::MouseButtons& buttons,
30 const Qt::KeyboardModifiers& modifiers,
32 bool handleMouseReleaseEvent( QMouseEvent* event )
override;
33 bool handleMouseMoveEvent( QMouseEvent* event,
34 const Qt::MouseButtons& buttons,
35 const Qt::KeyboardModifiers& modifiers,
37 bool handleWheelEvent( QWheelEvent* event,
38 const Qt::MouseButtons& buttons,
39 const Qt::KeyboardModifiers& modifiers,
42 bool handleKeyPressEvent( QKeyEvent* event,
45 void updateCamera()
override;
48 void setCameraPosition(
const Core::Vector3& position )
override;
49 void setCameraTarget(
const Core::Vector3& target )
override;
50 void fitScene(
const Core::Aabb& aabb )
override;
52 void resetCamera()
override;
55 virtual void handleCameraRotate( Scalar dx, Scalar dy );
56 virtual void handleCameraPan( Scalar dx, Scalar dy );
57 virtual void handleCameraZoom( Scalar dx, Scalar dy );
58 virtual void handleCameraZoom( Scalar z );
61 void setupKeyMappingCallbacks();
62 void panCallback( QEvent* event );
63 void rotateCallback( QEvent* event );
64 void zoomCallback( QEvent* event );
68 void initializeFixedUpVector();
69 Ra::Core::Vector3 m_fixUpVector { 0_ra, 1_ra, 0_ra };
70 Scalar m_flightSpeed { 1._ra };
71 static void configureKeyMapping_impl();
74#define KeyMappingFlightManipulator \
75 KMA_VALUE( FLIGHTMODECAMERA_PAN ) \
76 KMA_VALUE( FLIGHTMODECAMERA_ROTATE ) \
77 KMA_VALUE( FLIGHTMODECAMERA_ZOOM )
79#define KMA_VALUE( XX ) static KeyMappingManager::KeyMappingAction XX;
80 KeyMappingFlightManipulator
The CameraManipulator class is the generic class for camera manipulators.
virtual ~FlightCameraManipulator()
[Constructor]
This class manage a collection of binding/callback associated with a context.
KeyMappingManageable decorator to use as CRTP.
Ra::Core::Utils::Index KeyMappingAction
handle to an action
Ra::Core::Utils::Index Context
handle to a Context
hepler function to manage enum as underlying types in VariableSet