Public Member Functions | Protected Attributes
rviz::CameraBase Class Reference

Generic interface for a camera. More...

#include <camera_base.h>

Inheritance diagram for rviz::CameraBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CameraBase (Ogre::SceneManager *scene_manager)
 Constructor.
virtual void fromString (const std::string &str)=0
 Loads the camera's configure from the supplied string (generated through toString())
Ogre::Camera * getOgreCamera ()
 Get the Ogre camera associated with this camera object.
virtual Ogre::Quaternion getOrientation ()=0
 Get the orientation of this camera.
virtual Ogre::Vector3 getPosition ()=0
 Get the position of this camera.
virtual void lookAt (const Ogre::Vector3 &point)=0
 Point the camera at the specified point.
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.
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.
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.
virtual void mouseRightUp (int x, int y)
virtual void move (float x, float y, float z)=0
 Move the camera relative to its orientation.
virtual void pitch (float angle)=0
 Pitch the camera.
virtual void relativeNodeChanged ()
 Called when the relative node changes.
virtual void roll (float angle)=0
 Roll the camera.
virtual void scrollWheel (int diff, bool ctrl, bool alt, bool shift)=0
 Handle a scrollwheel change.
virtual void setFrom (CameraBase *camera)=0
 Set the position/orientation of this camera from another camera.
virtual void setOrientation (const Ogre::Quaternion &orientation)
 Set the orientation of the camera.
virtual void setOrientation (float x, float y, float z, float w)=0
 Set the orientation of the camera from a quaternion.
virtual void setPosition (const Ogre::Vector3 &position)
 Set the position of the camera.
virtual void setPosition (float x, float y, float z)=0
 Set the position of the camera.
void setRelativeNode (Ogre::SceneNode *node)
 Set a scene node that all camera transformations should be relative to.
virtual std::string toString ()=0
 Returns a string representation of the camera's configuration.
virtual void update ()=0
virtual void yaw (float angle)=0
 Yaw the camera.
virtual ~CameraBase ()

Protected Attributes

Ogre::Camera * camera_
 Ogre camera associated with this camera object.
Ogre::SceneNode * relative_node_
Ogre::SceneManager * scene_manager_
 Scene manager this camera is part of.

Detailed Description

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.


Constructor & Destructor Documentation

rviz::CameraBase::CameraBase ( Ogre::SceneManager *  scene_manager)

Constructor.

Parameters:
scene_managerScene manager this camera is displaying

Definition at line 44 of file camera_base.cpp.

Definition at line 54 of file camera_base.cpp.


Member Function Documentation

virtual void rviz::CameraBase::fromString ( const std::string &  str) [pure virtual]

Loads the camera's configure from the supplied string (generated through toString())

Parameters:
strThe string to load from

Implemented in rviz::OrbitCamera.

Ogre::Camera* rviz::CameraBase::getOgreCamera ( ) [inline]

Get the Ogre camera associated with this camera object.

Returns:
The Ogre camera associated with this camera object

Definition at line 67 of file camera_base.h.

virtual Ogre::Quaternion rviz::CameraBase::getOrientation ( ) [pure virtual]

Get the orientation of this camera.

Returns:
The orientation of this camera

Implemented in rviz::OrbitCamera.

virtual Ogre::Vector3 rviz::CameraBase::getPosition ( ) [pure virtual]

Get the position of this camera.

Returns:
The position of this camera

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::lookAt ( const Ogre::Vector3 &  point) [pure virtual]

Point the camera at the specified point.

Parameters:
pointThe point to look at

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::mouseLeftDown ( int  x,
int  y 
) [inline, virtual]

Reimplemented in rviz::OrbitCamera.

Definition at line 172 of file camera_base.h.

virtual void rviz::CameraBase::mouseLeftDrag ( int  diff_x,
int  diff_y,
bool  ctrl,
bool  alt,
bool  shift 
) [pure virtual]

Handle a left mouse button drag.

Parameters:
diff_xPixels the mouse has moved in the (window space) x direction
diff_yPixels the mouse has moved in the (window space) y direction

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::mouseLeftUp ( int  x,
int  y 
) [inline, virtual]

Reimplemented in rviz::OrbitCamera.

Definition at line 175 of file camera_base.h.

virtual void rviz::CameraBase::mouseMiddleDown ( int  x,
int  y 
) [inline, virtual]

Reimplemented in rviz::OrbitCamera.

Definition at line 173 of file camera_base.h.

virtual void rviz::CameraBase::mouseMiddleDrag ( int  diff_x,
int  diff_y,
bool  ctrl,
bool  alt,
bool  shift 
) [pure virtual]

Handle a middle mouse button drag.

Parameters:
diff_xPixels the mouse has moved in the (window space) x direction
diff_yPixels the mouse has moved in the (window space) y direction

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::mouseMiddleUp ( int  x,
int  y 
) [inline, virtual]

Reimplemented in rviz::OrbitCamera.

Definition at line 176 of file camera_base.h.

virtual void rviz::CameraBase::mouseRightDown ( int  x,
int  y 
) [inline, virtual]

Reimplemented in rviz::OrbitCamera.

Definition at line 174 of file camera_base.h.

virtual void rviz::CameraBase::mouseRightDrag ( int  diff_x,
int  diff_y,
bool  ctrl,
bool  alt,
bool  shift 
) [pure virtual]

Handle a right mouse button drag.

Parameters:
diff_xPixels the mouse has moved in the (window space) x direction
diff_yPixels the mouse has moved in the (window space) y direction

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::mouseRightUp ( int  x,
int  y 
) [inline, virtual]

Reimplemented in rviz::OrbitCamera.

Definition at line 177 of file camera_base.h.

virtual void rviz::CameraBase::move ( float  x,
float  y,
float  z 
) [pure virtual]

Move the camera relative to its orientation.

Parameters:
xDistance to move along the X-axis
yDistance to move along the Y-axis
zDistance to move along the Z-axis

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::pitch ( float  angle) [pure virtual]

Pitch the camera.

Calls to pitch are cumulative, so: pitch(PI); pitch(PI);

is equivalent to pitch(2*PI);

Parameters:
angleAngle to pitch, in radians

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::relativeNodeChanged ( ) [inline, virtual]

Called when the relative node changes.

Definition at line 77 of file camera_base.h.

virtual void rviz::CameraBase::roll ( float  angle) [pure virtual]

Roll the camera.

Calls to roll are cumulative, so: roll(PI); roll(PI);

is equivalent to roll(2*PI);

Parameters:
angleAngle to roll, in radians

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::scrollWheel ( int  diff,
bool  ctrl,
bool  alt,
bool  shift 
) [pure virtual]

Handle a scrollwheel change.

Parameters:
diffNumber of "units" the scrollwheel has moved
Todo:
Probably need to pass in how many units there are in a "click" of the wheel

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::setFrom ( CameraBase camera) [pure virtual]

Set the position/orientation of this camera from another camera.

Parameters:
cameraThe camera to set from

Implemented in rviz::OrbitCamera.

void rviz::CameraBase::setOrientation ( const Ogre::Quaternion &  orientation) [virtual]

Set the orientation of the camera.

Definition at line 73 of file camera_base.cpp.

virtual void rviz::CameraBase::setOrientation ( float  x,
float  y,
float  z,
float  w 
) [pure virtual]

Set the orientation of the camera from a quaternion.

Implemented in rviz::OrbitCamera.

void rviz::CameraBase::setPosition ( const Ogre::Vector3 &  position) [virtual]

Set the position of the camera.

Definition at line 68 of file camera_base.cpp.

virtual void rviz::CameraBase::setPosition ( float  x,
float  y,
float  z 
) [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.

Parameters:
nodeThe node

Definition at line 59 of file camera_base.cpp.

virtual std::string rviz::CameraBase::toString ( ) [pure virtual]

Returns a string representation of the camera's configuration.

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::update ( ) [pure virtual]

Implemented in rviz::OrbitCamera.

virtual void rviz::CameraBase::yaw ( float  angle) [pure virtual]

Yaw the camera.

Calls to yaw are cumulative, so: yaw(PI); yaw(PI);

is equivalent to yaw(2*PI);

Parameters:
angleAngle to yaw, in radians

Implemented in rviz::OrbitCamera.


Member Data Documentation

Ogre::Camera* rviz::CameraBase::camera_ [protected]

Ogre camera associated with this camera object.

Definition at line 219 of file camera_base.h.

Ogre::SceneNode* rviz::CameraBase::relative_node_ [protected]

Definition at line 222 of file camera_base.h.

Ogre::SceneManager* rviz::CameraBase::scene_manager_ [protected]

Scene manager this camera is part of.

Definition at line 220 of file camera_base.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Aug 27 2015 15:02:28