##

OrthoViewController Class Reference
Rendering

Orthographic view controller. More...

`#include <OrthoViewController.hh>`

Inherits OrbitViewController.

## Public Member Functions

| OrthoViewController (UserCameraPtr _camera)
| Constructor. More...
virtual | ~OrthoViewController ()
| Destructor. More...
ignition::math::Vector3d | FocalPoint () const
| Get the focal point. More...
std::string | GetTypeString () const
| Get the type of view controller. More...
virtual void | HandleKeyPressEvent (const std::string &_key)
| Handle a key press event. More...
void | HandleKeyReleaseEvent (const std::string &_key)
| Handle a key release event. More...
virtual void | HandleMouseEvent (const common::MouseEvent &_event)
| Handle a mouse event. More...
virtual void | Init ()
| Initialize the controller. More...
virtual void | Init (const ignition::math::Vector3d &_focalPoint, const double _yaw=0, const double _pitch=0)
| Initialize with a focus point. More...
double | Pitch () const
virtual void | Resize (const unsigned int _width, const unsigned int _height)
| Called by the UserCamera when a resize event occurs. More...
void | SetDistance (float _d)
| Set the distance to the focal point. More...
void | SetEnabled (bool _value)
| Set whether the controller is enabled. More...
void | SetFocalPoint (const ignition::math::Vector3d &_fp)
| Set the focal point. More...
virtual void | Update ()
| Update. More...
double | Yaw () const

## Static Public Member Functions

static std::string | GetTypeString ()
| Get the type name of this view controller. More...

## Protected Member Functions

double | NormalizePitch (double _v)
| Normalize pitch value. More...
double | NormalizeYaw (double _v)
| Normalize yaw value. More...
void | Orbit (double _dy, double _dp)
| Update the camera's pose based on a rotation update. More...
void | TranslateGlobal (const ignition::math::Vector3d &_vec)
| Translate the focal point in the global coordinate frame. More...
void | TranslateLocal (const ignition::math::Vector3d &_vec)
| Translate the focal point in the local coordinate frame. More...
void | UpdateRefVisual ()
| Update the reference visual. More...
void | Zoom (float _amount)
| Zoom the camera. More...

## Protected Attributes

UserCameraPtr | camera
| Pointer to the camera to control. More...
float | distance
| Distance to the focal point. More...
bool | enabled
| True if enabled. More...
ignition::math::Vector3d | focalPoint
| The focal point. More...
bool | init
| A flag used to inidicate that the view controller has just been initialized. More...
std::string | key
| Key that is currently pressed. More...
float | pitch
| Pitch value. More...
VisualPtr | refVisual
| A reference visual. More...
std::string | typeString
| Type of view controller. More...
float | yaw
| Yaw value. More...

## Detailed Description

Orthographic view controller.

## Constructor & Destructor Documentation

## OrthoViewController()

OrthoViewController | ( | UserCameraPtr | _camera | ) |

explicit

Constructor.

Parameters

  [in] | _camera | Pointer to the camera to control.

## ~OrthoViewController()

virtual ~OrthoViewController | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## FocalPoint()

ignition::math::Vector3d FocalPoint | ( |  | ) | const

inherited

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: "ortho".

## 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 inherited

Handle a key press event.

Parameters

  [in] | _key | The key that was pressed.

Implements ViewController.

## HandleKeyReleaseEvent()

void HandleKeyReleaseEvent | ( | const std::string & | _key | ) |

virtual inherited

Handle a key release event.

Parameters

  [in] | _key | The key that was released.

Implements ViewController.

## HandleMouseEvent()

virtual void HandleMouseEvent | ( | const common::MouseEvent & | _event | ) |

virtual

Handle a mouse event.

Parameters

  [in] | _event | The mouse event.

Reimplemented from OrbitViewController.

## Init() [1/2]

virtual void Init | ( |  | ) |

virtual

Initialize the controller.

Reimplemented from OrbitViewController.

## 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 OrbitViewController.

## NormalizePitch()

double NormalizePitch | ( | double | _v | ) |

protected inherited

Normalize pitch value.

\paramp[in] _v Normalize a pitch value.

Returns
  The normalized value.

## NormalizeYaw()

double NormalizeYaw | ( | double | _v | ) |

protected inherited

Normalize yaw value.

\paramp[in] _v Normalize a yaw value.

Returns
  The normalized value.

## Orbit()

void Orbit | ( | double | _dy,
|  | double | _dp
| ) |  |

protected inherited

Update the camera's pose based on a rotation update.

Parameters

  [in] | _dy | Delta yaw movement.
  [in] | _dp | Delta pitch movement.

## Pitch()

double Pitch | ( |  | ) | const

inherited

## Resize()

virtual void Resize | ( | const unsigned int | _width,
|  | const unsigned int | _height
| ) |  |

virtual

Called by the UserCamera when a resize event occurs.

Parameters

  [in] | _width | New width
  [in] | _height | New height

Reimplemented from ViewController.

## SetDistance()

void SetDistance | ( | float | _d | ) |

inherited

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 | ) |

inherited

Set the focal point.

Parameters

  [in] | _fp | The focal point

## TranslateGlobal()

void TranslateGlobal | ( | const ignition::math::Vector3d & | _vec | ) |

protected inherited

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 inherited

Translate the focal point in the local coordinate frame.

Parameters

  [in] | _vec | Direction and amount to translate the camera.

## Update()

virtual void Update | ( |  | ) |

virtual inherited

Update.

Implements ViewController.

## UpdateRefVisual()

void UpdateRefVisual | ( |  | ) |

protected inherited

Update the reference visual.

## Yaw()

double Yaw | ( |  | ) | const

inherited

## Zoom()

void Zoom | ( | float | _amount | ) |

protected inherited

Zoom the camera.

\paramp[in] _amount Zoom quatity.

## Member Data Documentation

## camera

UserCameraPtr camera

protected inherited

Pointer to the camera to control.

## distance

float distance

protected inherited

Distance to the focal point.

## enabled

bool enabled

protected inherited

True if enabled.

## focalPoint

ignition::math::Vector3d focalPoint

protected inherited

The focal point.

## init

bool init

protected inherited

A flag used to inidicate that the view controller has just been initialized.

## key

std::string key

protected inherited

Key that is currently pressed.

## pitch

float pitch

protected inherited

Pitch value.

## refVisual

VisualPtr refVisual

protected inherited

A reference visual.

## typeString

std::string typeString

protected inherited

Type of view controller.

## yaw

float yaw

protected inherited

Yaw value.

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

- OrthoViewController.hh