Base class for view controllers. More...
#include <rendering/rendering.hh>
Public Member Functions | |
ViewController (UserCameraPtr _camera) | |
Constructor. More... | |
virtual | ~ViewController () |
Destructor. More... | |
std::string | GetTypeString () const |
Get the type of view controller. More... | |
virtual void | HandleKeyPressEvent (const std::string &_key)=0 |
Handle a key press event. More... | |
virtual void | HandleKeyReleaseEvent (const std::string &_key)=0 |
Handle a key release event. More... | |
virtual void | HandleMouseEvent (const common::MouseEvent &_event)=0 |
Handle a mouse event. More... | |
virtual void | Init ()=0 |
Initialize the view controller. More... | |
virtual void | Init (const math::Vector3 &_focalPoint, const double _yaw=0, const double _pitch=0) |
Initialize with a focus point. More... | |
virtual void | Resize (const unsigned int _width, const unsigned int _height) |
Called by the UserCamera when a resize event occurs. More... | |
void | SetEnabled (bool _value) |
Set whether the controller is enabled. More... | |
virtual void | Update ()=0 |
Update the controller, which should update the position of the Camera. More... | |
Protected Attributes | |
UserCameraPtr | camera |
Pointer to the camera to control. More... | |
bool | enabled |
True if enabled. More... | |
std::string | typeString |
Type of view controller. More... | |
Base class for view controllers.
gazebo::rendering::ViewController::ViewController | ( | UserCameraPtr | _camera | ) |
Constructor.
[in] | _camera | The user camera to controll. |
|
virtual |
Destructor.
std::string gazebo::rendering::ViewController::GetTypeString | ( | ) | const |
Get the type of view controller.
|
pure virtual |
Handle a key press event.
[in] | _key | The key that was pressed. |
Implemented in gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.
|
pure virtual |
Handle a key release event.
[in] | _key | The key that was released. |
Implemented in gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.
|
pure virtual |
Handle a mouse event.
[in] | _event | The mouse position. |
Implemented in gazebo::rendering::OrthoViewController, gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.
|
pure virtual |
Initialize the view controller.
Implemented in gazebo::rendering::OrthoViewController, gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.
|
virtual |
Initialize with a focus point.
[in] | _focalPoint | The point to look at. |
[in] | _yaw | Initial yaw angle. |
[in] | _pitch | Initial pitch angle. |
Reimplemented in gazebo::rendering::OrthoViewController, and gazebo::rendering::OrbitViewController.
|
virtual |
Called by the UserCamera when a resize event occurs.
[in] | _width | New width |
[in] | _height | New height |
Reimplemented in gazebo::rendering::OrthoViewController.
void gazebo::rendering::ViewController::SetEnabled | ( | bool | _value | ) |
Set whether the controller is enabled.
[in] | _value | True if the controller is enabled. |
|
pure virtual |
Update the controller, which should update the position of the Camera.
Implemented in gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.
|
protected |
Pointer to the camera to control.
|
protected |
True if enabled.
|
protected |
Type of view controller.