$search
Like the orbit view controller, but focal point moves only in the x-y plane. More...
#include <xy_orbit_view_controller.h>
Public Member Functions | |
virtual void | fromString (const std::string &str) |
virtual std::string | getClassName () |
virtual void | handleMouseEvent (ViewportMouseEvent &evt) |
virtual void | lookAt (const Ogre::Vector3 &point) |
void | pitch (float angle) |
virtual std::string | toString () |
XYOrbitViewController (VisualizationManager *manager, const std::string &name, Ogre::SceneNode *target_scene_node) | |
void | yaw (float angle) |
void | zoom (float amount) |
Move in/out from the focal point, ie. adjust distance_ by amount. | |
virtual | ~XYOrbitViewController () |
Static Public Member Functions | |
static std::string | getClassNameStatic () |
Protected Member Functions | |
void | calculatePitchYawFromPosition (const Ogre::Vector3 &position) |
Calculates pitch and yaw values given a new position and the current focal point. | |
bool | intersectGroundPlane (Ogre::Ray mouse_ray, Ogre::Vector3 &intersection_3d) |
void | normalizePitch () |
Normalizes the camera's pitch, preventing it from reaching vertical (or turning upside down). | |
void | normalizeYaw () |
Normalizes the camera's yaw in the range [0, 2*pi). | |
virtual void | onActivate () |
virtual void | onDeactivate () |
virtual void | onTargetFrameChanged (const Ogre::Vector3 &old_reference_position, const Ogre::Quaternion &old_reference_orientation) |
virtual void | onUpdate (float dt, float ros_dt) |
void | updateCamera () |
Protected Attributes | |
float | distance_ |
The camera's distance from the focal point. | |
Ogre::Vector3 | focal_point_ |
The camera's focal point. | |
ogre_tools::Shape * | focal_shape_ |
float | pitch_ |
The camera's pitch (rotation around the x-axis), in radians. | |
float | yaw_ |
The camera's yaw (rotation around the y-axis), in radians. |
Like the orbit view controller, but focal point moves only in the x-y plane.
Definition at line 49 of file xy_orbit_view_controller.h.
rviz::XYOrbitViewController::XYOrbitViewController | ( | VisualizationManager * | manager, | |
const std::string & | name, | |||
Ogre::SceneNode * | target_scene_node | |||
) |
Definition at line 43 of file xy_orbit_view_controller.cpp.
rviz::XYOrbitViewController::~XYOrbitViewController | ( | ) | [virtual] |
Definition at line 56 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::calculatePitchYawFromPosition | ( | const Ogre::Vector3 & | position | ) | [protected] |
Calculates pitch and yaw values given a new position and the current focal point.
position | Position to calculate the pitch/yaw for |
Definition at line 280 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::fromString | ( | const std::string & | str | ) | [virtual] |
Implements rviz::ViewController.
Definition at line 310 of file xy_orbit_view_controller.cpp.
virtual std::string rviz::XYOrbitViewController::getClassName | ( | ) | [inline, virtual] |
Implements rviz::ViewController.
Definition at line 71 of file xy_orbit_view_controller.h.
static std::string rviz::XYOrbitViewController::getClassNameStatic | ( | ) | [inline, static] |
Definition at line 70 of file xy_orbit_view_controller.h.
void rviz::XYOrbitViewController::handleMouseEvent | ( | ViewportMouseEvent & | evt | ) | [virtual] |
Reimplemented from rviz::ViewController.
Definition at line 79 of file xy_orbit_view_controller.cpp.
bool rviz::XYOrbitViewController::intersectGroundPlane | ( | Ogre::Ray | mouse_ray, | |
Ogre::Vector3 & | intersection_3d | |||
) | [protected] |
Definition at line 61 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::lookAt | ( | const Ogre::Vector3 & | point | ) | [virtual] |
Implements rviz::ViewController.
Definition at line 200 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::normalizePitch | ( | ) | [protected] |
Normalizes the camera's pitch, preventing it from reaching vertical (or turning upside down).
Definition at line 224 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::normalizeYaw | ( | ) | [protected] |
Normalizes the camera's yaw in the range [0, 2*pi).
Definition at line 236 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::onActivate | ( | ) | [protected, virtual] |
Implements rviz::ViewController.
Definition at line 155 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::onDeactivate | ( | ) | [protected, virtual] |
Implements rviz::ViewController.
Definition at line 189 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::onTargetFrameChanged | ( | const Ogre::Vector3 & | old_reference_position, | |
const Ogre::Quaternion & | old_reference_orientation | |||
) | [protected, virtual] |
Implements rviz::ViewController.
Definition at line 209 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::onUpdate | ( | float | dt, | |
float | ros_dt | |||
) | [protected, virtual] |
Reimplemented from rviz::ViewController.
Definition at line 195 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::pitch | ( | float | angle | ) |
Definition at line 273 of file xy_orbit_view_controller.cpp.
std::string rviz::XYOrbitViewController::toString | ( | ) | [virtual] |
Implements rviz::ViewController.
Definition at line 329 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::updateCamera | ( | ) | [protected] |
Definition at line 246 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::yaw | ( | float | angle | ) |
Definition at line 266 of file xy_orbit_view_controller.cpp.
void rviz::XYOrbitViewController::zoom | ( | float | amount | ) |
Move in/out from the focal point, ie. adjust distance_ by amount.
amount | The distance to move. Positive amount moves towards the focal point, negative moves away |
Definition at line 300 of file xy_orbit_view_controller.cpp.
float rviz::XYOrbitViewController::distance_ [protected] |
The camera's distance from the focal point.
Definition at line 100 of file xy_orbit_view_controller.h.
Ogre::Vector3 rviz::XYOrbitViewController::focal_point_ [protected] |
The camera's focal point.
Definition at line 97 of file xy_orbit_view_controller.h.
Definition at line 101 of file xy_orbit_view_controller.h.
float rviz::XYOrbitViewController::pitch_ [protected] |
The camera's pitch (rotation around the x-axis), in radians.
Definition at line 99 of file xy_orbit_view_controller.h.
float rviz::XYOrbitViewController::yaw_ [protected] |
The camera's yaw (rotation around the y-axis), in radians.
Definition at line 98 of file xy_orbit_view_controller.h.