Generic interface for a camera. More...
#include <camera_base.h>

Public Member Functions | |
| CameraBase (Ogre::SceneManager *scene_manager) | |
| Constructor. More... | |
| virtual void | fromString (const std::string &str)=0 |
| Loads the camera's configure from the supplied string (generated through toString()) More... | |
| Ogre::Camera * | getOgreCamera () |
| Get the Ogre camera associated with this camera object. More... | |
| virtual Ogre::Quaternion | getOrientation ()=0 |
| Get the orientation of this camera. More... | |
| virtual Ogre::Vector3 | getPosition ()=0 |
| Get the position of this camera. More... | |
| virtual void | lookAt (const Ogre::Vector3 &point)=0 |
| Point the camera at the specified point. More... | |
| virtual void | mouseLeftDown (int x, int y) |
| virtual void | mouseLeftDrag (int diff_x, int diff_y, bool ctrl, bool alt, bool shift)=0 |
| Handle a left mouse button drag. More... | |
| virtual void | mouseLeftUp (int x, int y) |
| virtual void | mouseMiddleDown (int x, int y) |
| virtual void | mouseMiddleDrag (int diff_x, int diff_y, bool ctrl, bool alt, bool shift)=0 |
| Handle a middle mouse button drag. More... | |
| virtual void | mouseMiddleUp (int x, int y) |
| virtual void | mouseRightDown (int x, int y) |
| virtual void | mouseRightDrag (int diff_x, int diff_y, bool ctrl, bool alt, bool shift)=0 |
| Handle a right mouse button drag. More... | |
| virtual void | mouseRightUp (int x, int y) |
| virtual void | move (float x, float y, float z)=0 |
| Move the camera relative to its orientation. More... | |
| virtual void | pitch (float angle)=0 |
| Pitch the camera. More... | |
| virtual void | relativeNodeChanged () |
| Called when the relative node changes. More... | |
| virtual void | roll (float angle)=0 |
| Roll the camera. More... | |
| virtual void | scrollWheel (int diff, bool ctrl, bool alt, bool shift)=0 |
| Handle a scrollwheel change. More... | |
| virtual void | setFrom (CameraBase *camera)=0 |
| Set the position/orientation of this camera from another camera. More... | |
| virtual void | setOrientation (const Ogre::Quaternion &orientation) |
| Set the orientation of the camera. More... | |
| virtual void | setOrientation (float x, float y, float z, float w)=0 |
| Set the orientation of the camera from a quaternion. More... | |
| virtual void | setPosition (const Ogre::Vector3 &position) |
| Set the position of the camera. More... | |
| virtual void | setPosition (float x, float y, float z)=0 |
| Set the position of the camera. More... | |
| void | setRelativeNode (Ogre::SceneNode *node) |
| Set a scene node that all camera transformations should be relative to. More... | |
| virtual std::string | toString ()=0 |
| Returns a string representation of the camera's configuration. More... | |
| virtual void | update ()=0 |
| virtual void | yaw (float angle)=0 |
| Yaw the camera. More... | |
| virtual | ~CameraBase () |
Protected Attributes | |
| Ogre::Camera * | camera_ |
| Ogre camera associated with this camera object. More... | |
| Ogre::SceneNode * | relative_node_ |
| Ogre::SceneManager * | scene_manager_ |
| Scene manager this camera is part of. More... | |
Generic interface for a camera.
Provides a interface that a camera can override, providing interchangeability between different camera types. Specific implementation is left to the child class.
Definition at line 53 of file camera_base.h.
| rviz::CameraBase::CameraBase | ( | Ogre::SceneManager * | scene_manager | ) |
Constructor.
| scene_manager | Scene manager this camera is displaying |
Definition at line 44 of file camera_base.cpp.
|
virtual |
Definition at line 54 of file camera_base.cpp.
|
pure virtual |
Loads the camera's configure from the supplied string (generated through toString())
| str | The string to load from |
Implemented in rviz::OrbitCamera.
|
inline |
Get the Ogre camera associated with this camera object.
Definition at line 67 of file camera_base.h.
|
pure virtual |
Get the orientation of this camera.
Implemented in rviz::OrbitCamera.
|
pure virtual |
Get the position of this camera.
Implemented in rviz::OrbitCamera.
|
pure virtual |
Point the camera at the specified point.
| point | The point to look at |
Implemented in rviz::OrbitCamera.
|
inlinevirtual |
Reimplemented in rviz::OrbitCamera.
Definition at line 172 of file camera_base.h.
|
pure virtual |
Handle a left mouse button drag.
| diff_x | Pixels the mouse has moved in the (window space) x direction |
| diff_y | Pixels the mouse has moved in the (window space) y direction |
Implemented in rviz::OrbitCamera.
|
inlinevirtual |
Reimplemented in rviz::OrbitCamera.
Definition at line 175 of file camera_base.h.
|
inlinevirtual |
Reimplemented in rviz::OrbitCamera.
Definition at line 173 of file camera_base.h.
|
pure virtual |
Handle a middle mouse button drag.
| diff_x | Pixels the mouse has moved in the (window space) x direction |
| diff_y | Pixels the mouse has moved in the (window space) y direction |
Implemented in rviz::OrbitCamera.
|
inlinevirtual |
Reimplemented in rviz::OrbitCamera.
Definition at line 176 of file camera_base.h.
|
inlinevirtual |
Reimplemented in rviz::OrbitCamera.
Definition at line 174 of file camera_base.h.
|
pure virtual |
Handle a right mouse button drag.
| diff_x | Pixels the mouse has moved in the (window space) x direction |
| diff_y | Pixels the mouse has moved in the (window space) y direction |
Implemented in rviz::OrbitCamera.
|
inlinevirtual |
Reimplemented in rviz::OrbitCamera.
Definition at line 177 of file camera_base.h.
|
pure virtual |
Move the camera relative to its orientation.
| x | Distance to move along the X-axis |
| y | Distance to move along the Y-axis |
| z | Distance to move along the Z-axis |
Implemented in rviz::OrbitCamera.
|
pure virtual |
Pitch the camera.
Calls to pitch are cumulative, so: pitch(PI); pitch(PI);
is equivalent to pitch(2*PI);
| angle | Angle to pitch, in radians |
Implemented in rviz::OrbitCamera.
|
inlinevirtual |
Called when the relative node changes.
Definition at line 77 of file camera_base.h.
|
pure virtual |
Roll the camera.
Calls to roll are cumulative, so: roll(PI); roll(PI);
is equivalent to roll(2*PI);
| angle | Angle to roll, in radians |
Implemented in rviz::OrbitCamera.
|
pure virtual |
Handle a scrollwheel change.
| diff | Number of "units" the scrollwheel has moved |
Implemented in rviz::OrbitCamera.
|
pure virtual |
Set the position/orientation of this camera from another camera.
| camera | The camera to set from |
Implemented in rviz::OrbitCamera.
|
virtual |
Set the orientation of the camera.
Definition at line 73 of file camera_base.cpp.
|
pure virtual |
Set the orientation of the camera from a quaternion.
Implemented in rviz::OrbitCamera.
|
virtual |
Set the position of the camera.
Definition at line 68 of file camera_base.cpp.
|
pure virtual |
Set the position of the camera.
Implemented in rviz::OrbitCamera.
| void rviz::CameraBase::setRelativeNode | ( | Ogre::SceneNode * | node | ) |
Set a scene node that all camera transformations should be relative to.
| node | The node |
Definition at line 59 of file camera_base.cpp.
|
pure virtual |
Returns a string representation of the camera's configuration.
Implemented in rviz::OrbitCamera.
|
pure virtual |
Implemented in rviz::OrbitCamera.
|
pure virtual |
Yaw the camera.
Calls to yaw are cumulative, so: yaw(PI); yaw(PI);
is equivalent to yaw(2*PI);
| angle | Angle to yaw, in radians |
Implemented in rviz::OrbitCamera.
|
protected |
Ogre camera associated with this camera object.
Definition at line 219 of file camera_base.h.
|
protected |
Definition at line 222 of file camera_base.h.
|
protected |
Scene manager this camera is part of.
Definition at line 220 of file camera_base.h.