Orbit view controller.
More...
#include <OrbitViewController.hh>
Inherits ViewController.
Inherited by OrthoViewController.
|
| OrbitViewController (UserCameraPtr _camera, const std::string &_name="OrbitViewController") |
| Constructor.
|
|
virtual | ~OrbitViewController () |
| Destructor.
|
|
ignition::math::Vector3d | FocalPoint () const |
| Get the focal point.
|
|
std::string | GetTypeString () const |
| Get the type of view controller.
|
|
virtual void | HandleKeyPressEvent (const std::string &_key) |
| Handle a key press event.
|
|
void | HandleKeyReleaseEvent (const std::string &_key) |
| Handle a key release event.
|
|
virtual void | HandleMouseEvent (const common::MouseEvent &_event) |
| Handle a mouse event.
|
|
virtual void | Init () |
| Initialize the controller.
|
|
virtual void | Init (const ignition::math::Vector3d &_focalPoint, const double _yaw=0, const double _pitch=0) |
| Initialize with a focus point.
|
|
double | Pitch () const |
|
virtual void | Resize (const unsigned int _width, const unsigned int _height) |
| Called by the UserCamera when a resize event occurs.
|
|
void | SetDistance (float _d) |
| Set the distance to the focal point.
|
|
void | SetEnabled (bool _value) |
| Set whether the controller is enabled.
|
|
void | SetFocalPoint (const ignition::math::Vector3d &_fp) |
| Set the focal point.
|
|
virtual void | Update () |
| Update.
|
|
double | Yaw () const |
|
|
static std::string | GetTypeString () |
| Get the type name of this view controller.
|
|
|
double | NormalizePitch (double _v) |
| Normalize pitch value.
|
|
double | NormalizeYaw (double _v) |
| Normalize yaw value.
|
|
void | Orbit (double _dy, double _dp) |
| Update the camera's pose based on a rotation update.
|
|
void | TranslateGlobal (const ignition::math::Vector3d &_vec) |
| Translate the focal point in the global coordinate frame.
|
|
void | TranslateLocal (const ignition::math::Vector3d &_vec) |
| Translate the focal point in the local coordinate frame.
|
|
void | UpdateRefVisual () |
| Update the reference visual.
|
|
void | Zoom (float _amount) |
| Zoom the camera.
|
|
|
UserCameraPtr | camera |
| Pointer to the camera to control.
|
|
float | distance |
| Distance to the focal point.
|
|
bool | enabled |
| True if enabled.
|
|
ignition::math::Vector3d | focalPoint |
| The focal point.
|
|
bool | init |
| A flag used to inidicate that the view controller has just been initialized.
|
|
std::string | key |
| Key that is currently pressed.
|
|
float | pitch |
| Pitch value.
|
|
VisualPtr | refVisual |
| A reference visual.
|
|
std::string | typeString |
| Type of view controller.
|
|
float | yaw |
| Yaw value.
|
|
◆ OrbitViewController()
Constructor.
- Parameters
-
[in] | _camera | Pointer to the camera to control. |
[in] | _name | Name of the view controller. A subclass of OrbitViewController should use a name other than "OrbitViewController". |
◆ ~OrbitViewController()
◆ FocalPoint()
ignition::math::Vector3d FocalPoint |
( |
| ) |
const |
Get the focal point.
- Returns
- The focal point
◆ GetTypeString() [1/2]
static std::string GetTypeString |
( |
| ) |
|
|
static |
Get the type name of this view controller.
- Returns
- The view controller name: "orbit".
◆ GetTypeString() [2/2]
std::string GetTypeString |
( |
| ) |
const |
|
inherited |
Get the type of view controller.
- Returns
- The view controller type string.
◆ HandleKeyPressEvent()
virtual void HandleKeyPressEvent |
( |
const std::string & | _key | ) |
|
|
virtual |
Handle a key press event.
- Parameters
-
[in] | _key | The key that was pressed. |
Implements ViewController.
◆ HandleKeyReleaseEvent()
void HandleKeyReleaseEvent |
( |
const std::string & | _key | ) |
|
|
virtual |
Handle a key release event.
- Parameters
-
[in] | _key | The key that was released. |
Implements ViewController.
◆ HandleMouseEvent()
◆ Init() [1/2]
◆ Init() [2/2]
virtual void Init |
( |
const ignition::math::Vector3d & | _focalPoint, |
|
|
const double | _yaw = 0, |
|
|
const double | _pitch = 0 ) |
|
virtual |
Initialize with a focus point.
- Parameters
-
[in] | _focalPoint | The point to look at. |
[in] | _yaw | Initial yaw angle. |
[in] | _pitch | Initial pitch angle. |
Reimplemented from ViewController.
Reimplemented in OrthoViewController.
◆ NormalizePitch()
double NormalizePitch |
( |
double | _v | ) |
|
|
protected |
Normalize pitch value.
\paramp[in] _v Normalize a pitch value.
- Returns
- The normalized value.
◆ NormalizeYaw()
double NormalizeYaw |
( |
double | _v | ) |
|
|
protected |
Normalize yaw value.
\paramp[in] _v Normalize a yaw value.
- Returns
- The normalized value.
◆ Orbit()
void Orbit |
( |
double | _dy, |
|
|
double | _dp ) |
|
protected |
Update the camera's pose based on a rotation update.
- Parameters
-
[in] | _dy | Delta yaw movement. |
[in] | _dp | Delta pitch movement. |
◆ Pitch()
◆ Resize()
virtual void Resize |
( |
const unsigned int | _width, |
|
|
const unsigned int | _height ) |
|
virtualinherited |
◆ SetDistance()
void SetDistance |
( |
float | _d | ) |
|
Set the distance to the focal point.
- Parameters
-
[in] | _d | The distance from the focal point. |
◆ SetEnabled()
void SetEnabled |
( |
bool | _value | ) |
|
|
inherited |
Set whether the controller is enabled.
- Parameters
-
[in] | _value | True if the controller is enabled. |
◆ SetFocalPoint()
void SetFocalPoint |
( |
const ignition::math::Vector3d & | _fp | ) |
|
Set the focal point.
- Parameters
-
◆ TranslateGlobal()
void TranslateGlobal |
( |
const ignition::math::Vector3d & | _vec | ) |
|
|
protected |
Translate the focal point in the global coordinate frame.
- Parameters
-
[in] | _vec | Direction and amount to translate the camera. |
◆ TranslateLocal()
void TranslateLocal |
( |
const ignition::math::Vector3d & | _vec | ) |
|
|
protected |
Translate the focal point in the local coordinate frame.
- Parameters
-
[in] | _vec | Direction and amount to translate the camera. |
◆ Update()
◆ UpdateRefVisual()
Update the reference visual.
◆ Yaw()
◆ Zoom()
void Zoom |
( |
float | _amount | ) |
|
|
protected |
Zoom the camera.
\paramp[in] _amount Zoom quatity.
◆ camera
Pointer to the camera to control.
◆ distance
Distance to the focal point.
◆ enabled
◆ focalPoint
ignition::math::Vector3d focalPoint |
|
protected |
◆ init
A flag used to inidicate that the view controller has just been initialized.
◆ key
Key that is currently pressed.
◆ pitch
◆ refVisual
◆ typeString
◆ yaw
The documentation for this class was generated from the following file: