Public Member Functions | Protected Attributes | List of all members
gazebo::rendering::ViewController Class Referenceabstract

Base class for view controllers. More...

#include <rendering/rendering.hh>

Inheritance diagram for gazebo::rendering::ViewController:
Inheritance graph
[legend]

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

Detailed Description

Base class for view controllers.

Constructor & Destructor Documentation

gazebo::rendering::ViewController::ViewController ( UserCameraPtr  _camera)

Constructor.

Parameters
[in]_cameraThe user camera to controll.
virtual gazebo::rendering::ViewController::~ViewController ( )
virtual

Destructor.

Member Function Documentation

std::string gazebo::rendering::ViewController::GetTypeString ( ) const

Get the type of view controller.

Returns
The view controller type string.
virtual void gazebo::rendering::ViewController::HandleKeyPressEvent ( const std::string &  _key)
pure virtual

Handle a key press event.

Parameters
[in]_keyThe key that was pressed.

Implemented in gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.

virtual void gazebo::rendering::ViewController::HandleKeyReleaseEvent ( const std::string &  _key)
pure virtual

Handle a key release event.

Parameters
[in]_keyThe key that was released.

Implemented in gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.

virtual void gazebo::rendering::ViewController::HandleMouseEvent ( const common::MouseEvent _event)
pure virtual

Handle a mouse event.

Parameters
[in]_eventThe mouse position.

Implemented in gazebo::rendering::OrbitViewController, gazebo::rendering::OrthoViewController, and gazebo::rendering::FPSViewController.

virtual void gazebo::rendering::ViewController::Init ( )
pure virtual
virtual void gazebo::rendering::ViewController::Init ( const math::Vector3 _focalPoint,
const double  _yaw = 0,
const double  _pitch = 0 
)
virtual

Initialize with a focus point.

Parameters
[in]_focalPointThe point to look at.
[in]_yawInitial yaw angle.
[in]_pitchInitial pitch angle.

Reimplemented in gazebo::rendering::OrbitViewController, and gazebo::rendering::OrthoViewController.

virtual void gazebo::rendering::ViewController::Resize ( const unsigned int  _width,
const unsigned int  _height 
)
virtual

Called by the UserCamera when a resize event occurs.

Parameters
[in]_widthNew width
[in]_heightNew height

Reimplemented in gazebo::rendering::OrthoViewController.

void gazebo::rendering::ViewController::SetEnabled ( bool  _value)

Set whether the controller is enabled.

Parameters
[in]_valueTrue if the controller is enabled.
virtual void gazebo::rendering::ViewController::Update ( )
pure virtual

Update the controller, which should update the position of the Camera.

Implemented in gazebo::rendering::OrbitViewController, and gazebo::rendering::FPSViewController.

Member Data Documentation

UserCameraPtr gazebo::rendering::ViewController::camera
protected

Pointer to the camera to control.

bool gazebo::rendering::ViewController::enabled
protected

True if enabled.

std::string gazebo::rendering::ViewController::typeString
protected

Type of view controller.


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