Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Gui::FlightCameraManipulator Class Reference

#include <Gui/Viewer/FlightCameraManipulator.hpp>

+ Inheritance diagram for Ra::Gui::FlightCameraManipulator:
+ Collaboration diagram for Ra::Gui::FlightCameraManipulator:

Public Types

using KeyMapping = KeyMappingManageable<FlightCameraManipulator>
 

Public Slots

void setCameraPosition (const Core::Vector3 &position) override
 
void setCameraTarget (const Core::Vector3 &target) override
 
void fitScene (const Core::Aabb &aabb) override
 
void resetCamera () override
 
- Public Slots inherited from Ra::Gui::CameraManipulator
void mapCameraBehaviourToAabb (const Core::Aabb &aabb)
 Set the AABB to restrain the camera behavior against.
 
void unmapCameraBehaviourToAabb ()
 Free the camera from AABB restriction.
 
virtual void fitScene (const Core::Aabb &aabb)=0
 Setup the Camera according to the AABB of the scene to render.
 
virtual void setCameraPosition (const Core::Vector3 &position)=0
 Set the Camera position to position.
 
virtual void setCameraTarget (const Core::Vector3 &target)=0
 Set the Camera target to target.
 
virtual void resetCamera ()=0
 Reset the Camera settings to default values.
 
void setCameraSensitivity (Scalar sensitivity)
 
void setCameraFov (Scalar fov)
 
void setCameraFovInDegrees (Scalar fov)
 
void setCameraZNear (Scalar zNear)
 
void setCameraZFar (Scalar zFar)
 

Public Member Functions

 FlightCameraManipulator (const CameraManipulator &other)
 [Constructor]
 
virtual ~FlightCameraManipulator ()
 [Constructor]
 
KeyMappingManager::Context mappingContext () override
 
bool handleMousePressEvent (QMouseEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key) override
 
bool handleMouseReleaseEvent (QMouseEvent *event) override
 
bool handleMouseMoveEvent (QMouseEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key) override
 
bool handleWheelEvent (QWheelEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key) override
 
bool handleKeyPressEvent (QKeyEvent *event, const KeyMappingManager::KeyMappingAction &action) override
 
void updateCamera () override
 
- Public Member Functions inherited from Ra::Gui::CameraManipulator
 CameraManipulator ()
 Initializes a manipulator for a given viewport size.
 
 CameraManipulator (const CameraManipulator &other)
 
virtual ~CameraManipulator ()
 
virtual bool handleKeyReleaseEvent (QKeyEvent *event, const KeyMappingManager::KeyMappingAction &action)
 
const Core::Asset::CameragetCamera () const
 Pointer access to the camera.
 
Core::Asset::CameragetCamera ()
 Pointer access to the camera.
 
void attachLight (Engine::Scene::Light *light)
 
bool hasLightAttached () const
 
Engine::Scene::LightgetLight ()
 pointer acces to the attached light if it exists, returns nullptr otherwise.
 

Protected Member Functions

virtual void handleCameraRotate (Scalar dx, Scalar dy)
 
virtual void handleCameraPan (Scalar dx, Scalar dy)
 
virtual void handleCameraZoom (Scalar dx, Scalar dy)
 
virtual void handleCameraZoom (Scalar z)
 
- Protected Member Functions inherited from Ra::Gui::CameraManipulator
std::pair< Scalar, Scalar > computeDeltaMouseMove (const QMouseEvent *mouseEvent)
 
- Protected Member Functions inherited from Ra::Gui::KeyMappingManageable< FlightCameraManipulator >
FlightCameraManipulatorself ()
 

Friends

class KeyMappingManageable< FlightCameraManipulator >
 [Declare class]
 

Additional Inherited Members

- Static Public Member Functions inherited from Ra::Gui::KeyMappingManageable< FlightCameraManipulator >
static KeyMappingManager::Context getContext ()
 
static void configureKeyMapping ()
 
- Static Protected Member Functions inherited from Ra::Gui::KeyMappingManageable< FlightCameraManipulator >
static void setContext (const KeyMappingManager::Context &c)
 
- Protected Attributes inherited from Ra::Gui::CameraManipulator
Scalar m_lastMouseX { 0_ra }
 x-position of the mouse on the screen at the manipulation start.
 
Scalar m_lastMouseY { 0_ra }
 y-position of the mouse on the screen at the manipulation start.
 
Scalar m_cameraSensitivity { 1_ra }
 the Camera sensitivity to manipulation.
 
Scalar m_quickCameraModifier { 1_ra }
 Additional factor for camera sensitivity.
 
Scalar m_wheelSpeedModifier { 0.02_ra }
 Speed modifier on mouse wheel events.
 
Core::Aabb m_targetedAabb
 Camera behavior restriction AABB.
 
Scalar m_targetedAabbVolume { 0_ra }
 Volume of the m_targetedAabb.
 
bool m_mapCameraBahaviourToAabb { false }
 whether the camera is restrained or not
 
Core::Vector3 m_target { 0_ra, 0_ra, 0_ra }
 
Core::Asset::Cameram_camera { nullptr }
 The Camera.
 
Engine::Scene::Lightm_light { nullptr }
 The light attached to the Camera.
 

Detailed Description

A Flight manipulator for Cameras. [Declare class]

Definition at line 13 of file FlightCameraManipulator.hpp.

Member Typedef Documentation

◆ KeyMapping

Constructor & Destructor Documentation

◆ FlightCameraManipulator() [1/2]

Ra::Gui::FlightCameraManipulator::FlightCameraManipulator ( )

Definition at line 133 of file FlightCameraManipulator.cpp.

◆ FlightCameraManipulator() [2/2]

Ra::Gui::FlightCameraManipulator::FlightCameraManipulator ( const CameraManipulator & other)
explicit

[Constructor]

Definition at line 141 of file FlightCameraManipulator.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ fitScene

void Ra::Gui::FlightCameraManipulator::fitScene ( const Core::Aabb & aabb)
overrideslot

Definition at line 258 of file FlightCameraManipulator.cpp.

◆ handleCameraPan()

void Ra::Gui::FlightCameraManipulator::handleCameraPan ( Scalar dx,
Scalar dy )
protectedvirtual

Definition at line 302 of file FlightCameraManipulator.cpp.

◆ handleCameraRotate()

void Ra::Gui::FlightCameraManipulator::handleCameraRotate ( Scalar dx,
Scalar dy )
protectedvirtual

Definition at line 286 of file FlightCameraManipulator.cpp.

◆ handleCameraZoom() [1/2]

void Ra::Gui::FlightCameraManipulator::handleCameraZoom ( Scalar dx,
Scalar dy )
protectedvirtual

Definition at line 317 of file FlightCameraManipulator.cpp.

◆ handleCameraZoom() [2/2]

void Ra::Gui::FlightCameraManipulator::handleCameraZoom ( Scalar z)
protectedvirtual

Definition at line 321 of file FlightCameraManipulator.cpp.

◆ handleKeyPressEvent()

bool Ra::Gui::FlightCameraManipulator::handleKeyPressEvent ( QKeyEvent * event,
const KeyMappingManager::KeyMappingAction & action )
overridevirtual
Returns
true if the event has been taken into account, false otherwise

Reimplemented from Ra::Gui::CameraManipulator.

Definition at line 226 of file FlightCameraManipulator.cpp.

+ Here is the call graph for this function:

◆ handleMouseMoveEvent()

bool Ra::Gui::FlightCameraManipulator::handleMouseMoveEvent ( QMouseEvent * event,
const Qt::MouseButtons & buttons,
const Qt::KeyboardModifiers & modifiers,
int key )
overridevirtual
Returns
true if the event has been taken into account, false otherwise

Reimplemented from Ra::Gui::CameraManipulator.

Definition at line 189 of file FlightCameraManipulator.cpp.

+ Here is the call graph for this function:

◆ handleMousePressEvent()

bool Ra::Gui::FlightCameraManipulator::handleMousePressEvent ( QMouseEvent * event,
const Qt::MouseButtons & buttons,
const Qt::KeyboardModifiers & modifiers,
int key )
overridevirtual
Returns
true if the event has been taken into account, false otherwise

Reimplemented from Ra::Gui::CameraManipulator.

Definition at line 179 of file FlightCameraManipulator.cpp.

+ Here is the call graph for this function:

◆ handleMouseReleaseEvent()

bool Ra::Gui::FlightCameraManipulator::handleMouseReleaseEvent ( QMouseEvent * event)
overridevirtual
Returns
true if the event has been taken into account, false otherwise

Reimplemented from Ra::Gui::CameraManipulator.

Definition at line 207 of file FlightCameraManipulator.cpp.

◆ handleWheelEvent()

bool Ra::Gui::FlightCameraManipulator::handleWheelEvent ( QWheelEvent * event,
const Qt::MouseButtons & buttons,
const Qt::KeyboardModifiers & modifiers,
int key )
overridevirtual
Returns
true if the event has been taken into account, false otherwise
Todo
use action.

Reimplemented from Ra::Gui::CameraManipulator.

Definition at line 211 of file FlightCameraManipulator.cpp.

+ Here is the call graph for this function:

◆ mappingContext()

KeyMappingManager::Context Ra::Gui::Gui::FlightCameraManipulator::mappingContext ( )
overridevirtual
Returns
the mapping context for keymapping, Index::Invalid() if no mapping is available

Reimplemented from Ra::Gui::CameraManipulator.

Definition at line 129 of file FlightCameraManipulator.cpp.

◆ resetCamera

void Ra::Gui::FlightCameraManipulator::resetCamera ( )
overrideslot

Definition at line 165 of file FlightCameraManipulator.cpp.

◆ setCameraPosition

void Ra::Gui::FlightCameraManipulator::setCameraPosition ( const Core::Vector3 & position)
overrideslot

Definition at line 232 of file FlightCameraManipulator.cpp.

◆ setCameraTarget

void Ra::Gui::FlightCameraManipulator::setCameraTarget ( const Core::Vector3 & target)
overrideslot

Definition at line 246 of file FlightCameraManipulator.cpp.

◆ updateCamera()

void Ra::Gui::FlightCameraManipulator::updateCamera ( )
overridevirtual

Reset manipulator internal data according to current active camera from manager. Call each time the active camera is changed to have coherent data.

Reimplemented from Ra::Gui::CameraManipulator.

Definition at line 152 of file FlightCameraManipulator.cpp.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ KeyMappingManageable< FlightCameraManipulator >

[Declare class]

Definition at line 13 of file FlightCameraManipulator.hpp.


The documentation for this class was generated from the following files: