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

A first-person camera, controlled by yaw, pitch, and position. More...

#include <fps_view_controller.h>

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

List of all members.

Public Member Functions

 FPSViewController ()
virtual void handleMouseEvent (ViewportMouseEvent &evt)
virtual void lookAt (const Ogre::Vector3 &point)
 This should be implemented in each subclass to aim the camera at the given point in space (relative to the fixed frame).
virtual void mimic (ViewController *source_view)
 Configure the settings of this view controller to give, as much as possible, a similar view as that given by the source_view.
void move (float x, float y, float z)
virtual void onInitialize ()
 Do subclass-specific initialization. Called by ViewController::initialize after context_, target_scene_node_, and camera_ are set. This version calls updateTargetSceneNode().
void pitch (float angle)
virtual void reset ()
virtual void update (float dt, float ros_dt)
 Called at 30Hz by ViewManager::update() while this view is active. Override with code that needs to run repeatedly.
void yaw (float angle)
virtual ~FPSViewController ()

Protected Member Functions

Ogre::Quaternion getOrientation ()
 Return a Quaternion based on the yaw and pitch properties.
virtual void onTargetFrameChanged (const Ogre::Vector3 &old_reference_position, const Ogre::Quaternion &old_reference_orientation)
 Override to implement the change in properties which nullifies the change in target frame.
void setPropertiesFromCamera (Ogre::Camera *source_camera)
void updateCamera ()

Protected Attributes

FloatPropertypitch_property_
 The camera's pitch (rotation around the x-axis), in radians.
VectorPropertyposition_property_
FloatPropertyyaw_property_
 The camera's yaw (rotation around the y-axis), in radians.

Detailed Description

A first-person camera, controlled by yaw, pitch, and position.

Definition at line 46 of file fps_view_controller.h.


Constructor & Destructor Documentation

Definition at line 57 of file fps_view_controller.cpp.

Definition at line 68 of file fps_view_controller.cpp.


Member Function Documentation

Ogre::Quaternion rviz::FPSViewController::getOrientation ( ) [protected]

Return a Quaternion based on the yaw and pitch properties.

Definition at line 226 of file fps_view_controller.cpp.

Reimplemented from rviz::ViewController.

Definition at line 93 of file fps_view_controller.cpp.

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

This should be implemented in each subclass to aim the camera at the given point in space (relative to the fixed frame).

Reimplemented from rviz::ViewController.

Definition at line 199 of file fps_view_controller.cpp.

void rviz::FPSViewController::mimic ( ViewController source_view) [virtual]

Configure the settings of this view controller to give, as much as possible, a similar view as that given by the source_view.

source_view must return a valid Ogre::Camera* from getCamera().

Reimplemented from rviz::FramePositionTrackingViewController.

Definition at line 187 of file fps_view_controller.cpp.

void rviz::FPSViewController::move ( float  x,
float  y,
float  z 
)

Definition at line 236 of file fps_view_controller.cpp.

Do subclass-specific initialization. Called by ViewController::initialize after context_, target_scene_node_, and camera_ are set. This version calls updateTargetSceneNode().

Reimplemented from rviz::FramePositionTrackingViewController.

Definition at line 72 of file fps_view_controller.cpp.

void rviz::FPSViewController::onTargetFrameChanged ( const Ogre::Vector3 &  old_reference_position,
const Ogre::Quaternion &  old_reference_orientation 
) [protected, virtual]

Override to implement the change in properties which nullifies the change in target frame.

See also:
updateTargetFrame()

Reimplemented from rviz::FramePositionTrackingViewController.

Definition at line 205 of file fps_view_controller.cpp.

void rviz::FPSViewController::pitch ( float  angle)

Definition at line 221 of file fps_view_controller.cpp.

void rviz::FPSViewController::reset ( ) [virtual]

Reset the view controller to some sane initial state, like looking at 0,0,0 from a few meters away.

Implements rviz::ViewController.

Definition at line 78 of file fps_view_controller.cpp.

void rviz::FPSViewController::setPropertiesFromCamera ( Ogre::Camera *  source_camera) [protected]

Definition at line 151 of file fps_view_controller.cpp.

void rviz::FPSViewController::update ( float  dt,
float  ros_dt 
) [virtual]

Called at 30Hz by ViewManager::update() while this view is active. Override with code that needs to run repeatedly.

Reimplemented from rviz::FramePositionTrackingViewController.

Definition at line 193 of file fps_view_controller.cpp.

Definition at line 210 of file fps_view_controller.cpp.

void rviz::FPSViewController::yaw ( float  angle)

Definition at line 216 of file fps_view_controller.cpp.


Member Data Documentation

The camera's pitch (rotation around the x-axis), in radians.

Definition at line 84 of file fps_view_controller.h.

Definition at line 85 of file fps_view_controller.h.

The camera's yaw (rotation around the y-axis), in radians.

Definition at line 83 of file fps_view_controller.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