A Trackball manipulator for Cameras.
More...
#include <Gui/Viewer/TrackballCameraManipulator.hpp>
|
void | setCameraPosition (const Core::Vector3 &position) override |
|
void | setCameraTarget (const Core::Vector3 &target) override |
|
void | fitScene (const Core::Aabb &aabb) override |
|
void | resetCamera () override |
|
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) |
|
|
| TrackballCameraManipulator () |
| Default constructor.
|
|
| TrackballCameraManipulator (const CameraManipulator &other) |
|
virtual | ~TrackballCameraManipulator () |
| Destructor.
|
|
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 | toggleRotateAround () |
|
void | updateCamera () override |
|
void | setTrackballRadius (Scalar rad) |
|
Scalar | getTrackballRadius () const |
| Return the distance from the camera to the target point.
|
|
const Core::Transform::ConstTranslationPart | getTrackballCenter () const |
|
KeyMappingManager::Context | mappingContext () override |
|
| 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::Camera * | getCamera () const |
| Pointer access to the camera.
|
|
Core::Asset::Camera * | getCamera () |
| Pointer access to the camera.
|
|
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.
|
|
A Trackball manipulator for Cameras.
Definition at line 13 of file TrackballCameraManipulator.hpp.
◆ KeyMapping
◆ TrackballCameraManipulator() [1/2]
Ra::Gui::TrackballCameraManipulator::TrackballCameraManipulator |
( |
| ) |
|
◆ TrackballCameraManipulator() [2/2]
Ra::Gui::TrackballCameraManipulator::TrackballCameraManipulator |
( |
const CameraManipulator & | other | ) |
|
|
explicit |
Copy constructor used when switching camera manipulator Requires that m_target is on the line of sight of the camera.
Definition at line 79 of file TrackballCameraManipulator.cpp.
◆ ~TrackballCameraManipulator()
Ra::Gui::TrackballCameraManipulator::~TrackballCameraManipulator |
( |
| ) |
|
|
virtual |
◆ fitScene
void Ra::Gui::TrackballCameraManipulator::fitScene |
( |
const Core::Aabb & | aabb | ) |
|
|
overrideslot |
◆ getTrackballCenter()
Core::Transform::ConstTranslationPart Ra::Gui::TrackballCameraManipulator::getTrackballCenter |
( |
| ) |
const |
◆ getTrackballRadius()
Scalar Ra::Gui::TrackballCameraManipulator::getTrackballRadius |
( |
| ) |
const |
◆ handleCameraMoveForward() [1/2]
void Ra::Gui::TrackballCameraManipulator::handleCameraMoveForward |
( |
Scalar | dx, |
|
|
Scalar | dy ) |
|
protectedvirtual |
◆ handleCameraMoveForward() [2/2]
void Ra::Gui::TrackballCameraManipulator::handleCameraMoveForward |
( |
Scalar | z | ) |
|
|
protectedvirtual |
◆ handleCameraPan()
void Ra::Gui::TrackballCameraManipulator::handleCameraPan |
( |
Scalar | dx, |
|
|
Scalar | dy ) |
|
protectedvirtual |
◆ handleCameraRotate()
void Ra::Gui::TrackballCameraManipulator::handleCameraRotate |
( |
Scalar | dx, |
|
|
Scalar | dy ) |
|
protectedvirtual |
◆ handleCameraZoom() [1/2]
void Ra::Gui::TrackballCameraManipulator::handleCameraZoom |
( |
Scalar | dx, |
|
|
Scalar | dy ) |
|
protectedvirtual |
◆ handleCameraZoom() [2/2]
void Ra::Gui::TrackballCameraManipulator::handleCameraZoom |
( |
Scalar | z | ) |
|
|
protectedvirtual |
◆ handleKeyPressEvent()
◆ handleMouseMoveEvent()
bool Ra::Gui::TrackballCameraManipulator::handleMouseMoveEvent |
( |
QMouseEvent * | event, |
|
|
const Qt::MouseButtons & | buttons, |
|
|
const Qt::KeyboardModifiers & | modifiers, |
|
|
int | key ) |
|
overridevirtual |
◆ handleMousePressEvent()
bool Ra::Gui::TrackballCameraManipulator::handleMousePressEvent |
( |
QMouseEvent * | event, |
|
|
const Qt::MouseButtons & | buttons, |
|
|
const Qt::KeyboardModifiers & | modifiers, |
|
|
int | key ) |
|
overridevirtual |
◆ handleMouseReleaseEvent()
bool Ra::Gui::TrackballCameraManipulator::handleMouseReleaseEvent |
( |
QMouseEvent * | event | ) |
|
|
overridevirtual |
◆ handleWheelEvent()
bool Ra::Gui::TrackballCameraManipulator::handleWheelEvent |
( |
QWheelEvent * | event, |
|
|
const Qt::MouseButtons & | buttons, |
|
|
const Qt::KeyboardModifiers & | modifiers, |
|
|
int | key ) |
|
overridevirtual |
◆ mappingContext()
◆ resetCamera
void Ra::Gui::TrackballCameraManipulator::resetCamera |
( |
| ) |
|
|
overrideslot |
◆ setCameraPosition
void Ra::Gui::TrackballCameraManipulator::setCameraPosition |
( |
const Core::Vector3 & | position | ) |
|
|
overrideslot |
◆ setCameraTarget
void Ra::Gui::TrackballCameraManipulator::setCameraTarget |
( |
const Core::Vector3 & | target | ) |
|
|
overrideslot |
◆ setTrackballRadius()
void Ra::Gui::TrackballCameraManipulator::setTrackballRadius |
( |
Scalar | rad | ) |
|
Set the distance from the camera to the target point. update target m_referenceFrame.translation();
- Note
- doesn't modify the camera.
Definition at line 127 of file TrackballCameraManipulator.cpp.
◆ updateCamera()
void Ra::Gui::TrackballCameraManipulator::updateCamera |
( |
| ) |
|
|
overridevirtual |
◆ updatePhiTheta()
void Ra::Gui::TrackballCameraManipulator::updatePhiTheta |
( |
| ) |
|
|
protected |
◆ KeyMappingManageable< TrackballCameraManipulator >
◆ m_distFromCenter
Scalar Ra::Gui::TrackballCameraManipulator::m_distFromCenter { 0_ra } |
|
protected |
◆ m_keyMappingCallbackManager
◆ m_phi
Scalar Ra::Gui::TrackballCameraManipulator::m_phi { 0_ra } |
|
protected |
◆ m_phiDir
Scalar Ra::Gui::TrackballCameraManipulator::m_phiDir { 1_ra } |
|
protected |
◆ m_referenceFrame
Core::Transform Ra::Gui::TrackballCameraManipulator::m_referenceFrame |
|
protected |
◆ m_theta
Scalar Ra::Gui::TrackballCameraManipulator::m_theta { 0_ra } |
|
protected |
The documentation for this class was generated from the following files: