The CameraManipulator class is the generic class for camera manipulators.
More...
#include <Gui/Viewer/CameraManipulator.hpp>
|
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) |
|
|
| CameraManipulator () |
| Initializes a manipulator for a given viewport size.
|
|
| CameraManipulator (const CameraManipulator &other) |
|
virtual | ~CameraManipulator () |
|
virtual KeyMappingManager::Context | mappingContext () |
|
virtual bool | handleMousePressEvent (QMouseEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key) |
|
virtual bool | handleMouseReleaseEvent (QMouseEvent *event) |
|
virtual bool | handleMouseMoveEvent (QMouseEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key) |
|
virtual bool | handleWheelEvent (QWheelEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key) |
|
virtual bool | handleKeyPressEvent (QKeyEvent *event, const KeyMappingManager::KeyMappingAction &action) |
|
virtual bool | handleKeyReleaseEvent (QKeyEvent *event, const KeyMappingManager::KeyMappingAction &action) |
|
const Core::Asset::Camera * | getCamera () const |
| Pointer access to the camera.
|
|
Core::Asset::Camera * | getCamera () |
| Pointer access to the camera.
|
|
virtual void | updateCamera () |
|
void | attachLight (Engine::Scene::Light *light) |
|
bool | hasLightAttached () const |
|
Engine::Scene::Light * | getLight () |
| pointer acces to the attached light if it exists, returns nullptr otherwise.
|
|
The CameraManipulator class is the generic class for camera manipulators.
Definition at line 29 of file CameraManipulator.hpp.
◆ CameraManipulator() [1/2]
Ra::Gui::CameraManipulator::CameraManipulator |
( |
| ) |
|
◆ CameraManipulator() [2/2]
Initializes a manipulator keeping properties from an already existing one. This allows to switch from one manipulator to another while keeping the same visual experience.
Definition at line 14 of file CameraManipulator.cpp.
◆ ~CameraManipulator()
Ra::Gui::CameraManipulator::~CameraManipulator |
( |
| ) |
|
|
virtual |
Destructor. As a Manipulator does not have ownership over the associated Camera, do not release the associated Camera.
Definition at line 32 of file CameraManipulator.cpp.
◆ attachLight()
◆ computeDeltaMouseMove()
std::pair< Scalar, Scalar > Ra::Gui::CameraManipulator::computeDeltaMouseMove |
( |
const QMouseEvent * | mouseEvent | ) |
|
|
inlineprotected |
◆ getCamera() [1/2]
◆ getCamera() [2/2]
◆ getLight()
pointer acces to the attached light if it exists, returns nullptr otherwise.
Definition at line 93 of file CameraManipulator.hpp.
◆ handleKeyPressEvent()
◆ handleKeyReleaseEvent()
- Returns
- true if the event has been taken into account, false otherwise
Definition at line 105 of file CameraManipulator.cpp.
◆ handleMouseMoveEvent()
bool Ra::Gui::CameraManipulator::handleMouseMoveEvent |
( |
QMouseEvent * | event, |
|
|
const Qt::MouseButtons & | buttons, |
|
|
const Qt::KeyboardModifiers & | modifiers, |
|
|
int | key ) |
|
virtual |
◆ handleMousePressEvent()
bool Ra::Gui::CameraManipulator::handleMousePressEvent |
( |
QMouseEvent * | event, |
|
|
const Qt::MouseButtons & | buttons, |
|
|
const Qt::KeyboardModifiers & | modifiers, |
|
|
int | key ) |
|
virtual |
◆ handleMouseReleaseEvent()
bool Ra::Gui::CameraManipulator::handleMouseReleaseEvent |
( |
QMouseEvent * | event | ) |
|
|
virtual |
◆ handleWheelEvent()
bool Ra::Gui::CameraManipulator::handleWheelEvent |
( |
QWheelEvent * | event, |
|
|
const Qt::MouseButtons & | buttons, |
|
|
const Qt::KeyboardModifiers & | modifiers, |
|
|
int | key ) |
|
virtual |
◆ hasLightAttached()
bool Ra::Gui::CameraManipulator::hasLightAttached |
( |
| ) |
const |
|
inline |
- Returns
- true if a Light is attached to the camera, false otherwise.
Definition at line 90 of file CameraManipulator.hpp.
◆ mapCameraBehaviourToAabb
void Ra::Gui::CameraManipulator::mapCameraBehaviourToAabb |
( |
const Core::Aabb & | aabb | ) |
|
|
slot |
◆ mappingContext()
◆ setCameraFov
void Ra::Gui::CameraManipulator::setCameraFov |
( |
Scalar | fov | ) |
|
|
slot |
◆ setCameraFovInDegrees
void Ra::Gui::CameraManipulator::setCameraFovInDegrees |
( |
Scalar | fov | ) |
|
|
slot |
◆ setCameraSensitivity
void Ra::Gui::CameraManipulator::setCameraSensitivity |
( |
Scalar | sensitivity | ) |
|
|
slot |
◆ setCameraZFar
void Ra::Gui::CameraManipulator::setCameraZFar |
( |
Scalar | zFar | ) |
|
|
slot |
◆ setCameraZNear
void Ra::Gui::CameraManipulator::setCameraZNear |
( |
Scalar | zNear | ) |
|
|
slot |
◆ unmapCameraBehaviourToAabb
void Ra::Gui::CameraManipulator::unmapCameraBehaviourToAabb |
( |
| ) |
|
|
slot |
◆ updateCamera()
void Ra::Gui::CameraManipulator::updateCamera |
( |
| ) |
|
|
virtual |
◆ m_camera
◆ m_cameraSensitivity
Scalar Ra::Gui::CameraManipulator::m_cameraSensitivity { 1_ra } |
|
protected |
◆ m_lastMouseX
Scalar Ra::Gui::CameraManipulator::m_lastMouseX { 0_ra } |
|
protected |
◆ m_lastMouseY
Scalar Ra::Gui::CameraManipulator::m_lastMouseY { 0_ra } |
|
protected |
◆ m_light
◆ m_mapCameraBahaviourToAabb
bool Ra::Gui::CameraManipulator::m_mapCameraBahaviourToAabb { false } |
|
protected |
◆ m_quickCameraModifier
Scalar Ra::Gui::CameraManipulator::m_quickCameraModifier { 1_ra } |
|
protected |
◆ m_target
Core::Vector3 Ra::Gui::CameraManipulator::m_target { 0_ra, 0_ra, 0_ra } |
|
protected |
Target point of the camera (usefull for most of the manipulator metaphor) Be aware that m_target must always be on the line of sight of the camera so that it could be used as a "focus" point by a manipulator.
Definition at line 151 of file CameraManipulator.hpp.
◆ m_targetedAabb
Core::Aabb Ra::Gui::CameraManipulator::m_targetedAabb |
|
protected |
◆ m_targetedAabbVolume
Scalar Ra::Gui::CameraManipulator::m_targetedAabbVolume { 0_ra } |
|
protected |
◆ m_wheelSpeedModifier
Scalar Ra::Gui::CameraManipulator::m_wheelSpeedModifier { 0.02_ra } |
|
protected |
The documentation for this class was generated from the following files: