Orbit view controller.
More...
#include <OrbitViewController.hh>
Inherits ViewController.
Inherited by OrthoViewController.
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". |
ignition::math::Vector3d FocalPoint |
( |
| ) |
const |
Get the focal point.
- Returns
- The focal point
static std::string GetTypeString |
( |
| ) |
|
|
static |
Get the type name of this view controller.
- Returns
- The view controller name: "orbit".
std::string GetTypeString |
( |
| ) |
const |
|
inherited |
Get the type of view controller.
- Returns
- The view controller type string.
virtual void HandleKeyPressEvent |
( |
const std::string & |
_key | ) |
|
|
virtual |
Handle a key press event.
- Parameters
-
[in] | _key | The key that was pressed. |
Implements ViewController.
void HandleKeyReleaseEvent |
( |
const std::string & |
_key | ) |
|
|
virtual |
Handle a key release event.
- Parameters
-
[in] | _key | The key that was released. |
Implements ViewController.
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.
double NormalizePitch |
( |
double |
_v | ) |
|
|
protected |
Normalize pitch value.
[in] _v Normalize a pitch value.
- Returns
- The normalized value.
double NormalizeYaw |
( |
double |
_v | ) |
|
|
protected |
Normalize yaw value.
[in] _v Normalize a yaw value.
- Returns
- The normalized value.
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. |
virtual void Resize |
( |
const unsigned int |
_width, |
|
|
const unsigned int |
_height |
|
) |
| |
|
virtualinherited |
void SetDistance |
( |
float |
_d | ) |
|
Set the distance to the focal point.
- Parameters
-
[in] | _d | The distance from the focal point. |
void SetEnabled |
( |
bool |
_value | ) |
|
|
inherited |
Set whether the controller is enabled.
- Parameters
-
[in] | _value | True if the controller is enabled. |
void SetFocalPoint |
( |
const ignition::math::Vector3d & |
_fp | ) |
|
Set the focal point.
- Parameters
-
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. |
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 the reference visual.
void Zoom |
( |
float |
_amount | ) |
|
|
protected |
Zoom the camera.
[in] _amount Zoom quatity.
Pointer to the camera to control.
Distance to the focal point.
ignition::math::Vector3d focalPoint |
|
protected |
A flag used to inidicate that the view controller has just been initialized.
Key that is currently pressed.
The documentation for this class was generated from the following file: