Base class of ViewControllers which have a "Target Frame" which is a TF frame whose position they track. More...
#include <frame_position_tracking_view_controller.h>
Public Member Functions | |
FramePositionTrackingViewController () | |
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. | |
virtual void | onActivate () |
called by activate(). | |
virtual void | onInitialize () |
Do subclass-specific initialization. Called by ViewController::initialize after context_, target_scene_node_, and camera_ are set. This version calls updateTargetSceneNode(). | |
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. | |
virtual | ~FramePositionTrackingViewController () |
Protected Slots | |
virtual void | updateTargetFrame () |
Called when Target Frame property changes while view is active. Purpose is to change values in the view controller (like a position offset) such that the actual viewpoint does not change. Calls updateTargetSceneNode() and onTargetFrameChanged(). | |
Protected Member Functions | |
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 | updateTargetSceneNode () |
Update the position of the target_scene_node_ from the TF frame specified in the Target Frame property. | |
Protected Attributes | |
Ogre::Quaternion | reference_orientation_ |
Ogre::Vector3 | reference_position_ |
TfFrameProperty * | target_frame_property_ |
Ogre::SceneNode * | target_scene_node_ |
Base class of ViewControllers which have a "Target Frame" which is a TF frame whose position they track.
Definition at line 45 of file frame_position_tracking_view_controller.h.
Definition at line 46 of file frame_position_tracking_view_controller.cpp.
Definition at line 62 of file frame_position_tracking_view_controller.cpp.
void rviz::FramePositionTrackingViewController::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().
This base class implementation does nothing.
Reimplemented from rviz::ViewController.
Reimplemented in rviz::OrbitViewController, rviz::FPSViewController, rviz::FixedOrientationOrthoViewController, and rviz::XYOrbitViewController.
Definition at line 124 of file frame_position_tracking_view_controller.cpp.
void rviz::FramePositionTrackingViewController::onActivate | ( | ) | [virtual] |
called by activate().
Override to implement view-specific activation. This version calls updateTargetSceneNode().
Reimplemented from rviz::ViewController.
Definition at line 67 of file frame_position_tracking_view_controller.cpp.
void rviz::FramePositionTrackingViewController::onInitialize | ( | ) | [virtual] |
Do subclass-specific initialization. Called by ViewController::initialize after context_, target_scene_node_, and camera_ are set. This version calls updateTargetSceneNode().
Reimplemented from rviz::ViewController.
Reimplemented in rviz::OrbitViewController, rviz::FPSViewController, rviz::XYOrbitViewController, and rviz::FixedOrientationOrthoViewController.
Definition at line 53 of file frame_position_tracking_view_controller.cpp.
virtual void rviz::FramePositionTrackingViewController::onTargetFrameChanged | ( | const Ogre::Vector3 & | old_reference_position, |
const Ogre::Quaternion & | old_reference_orientation | ||
) | [inline, protected, virtual] |
Override to implement the change in properties which nullifies the change in target frame.
Reimplemented in rviz::OrbitViewController, rviz::FPSViewController, and rviz::FixedOrientationOrthoViewController.
Definition at line 87 of file frame_position_tracking_view_controller.h.
void rviz::FramePositionTrackingViewController::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::ViewController.
Reimplemented in rviz::OrbitViewController, rviz::FPSViewController, and rviz::FixedOrientationOrthoViewController.
Definition at line 80 of file frame_position_tracking_view_controller.cpp.
void rviz::FramePositionTrackingViewController::updateTargetFrame | ( | ) | [protected, virtual, slot] |
Called when Target Frame property changes while view is active. Purpose is to change values in the view controller (like a position offset) such that the actual viewpoint does not change. Calls updateTargetSceneNode() and onTargetFrameChanged().
Definition at line 85 of file frame_position_tracking_view_controller.cpp.
void rviz::FramePositionTrackingViewController::updateTargetSceneNode | ( | ) | [protected] |
Update the position of the target_scene_node_ from the TF frame specified in the Target Frame property.
Definition at line 95 of file frame_position_tracking_view_controller.cpp.
Ogre::Quaternion rviz::FramePositionTrackingViewController::reference_orientation_ [protected] |
Definition at line 95 of file frame_position_tracking_view_controller.h.
Ogre::Vector3 rviz::FramePositionTrackingViewController::reference_position_ [protected] |
Definition at line 96 of file frame_position_tracking_view_controller.h.
Definition at line 93 of file frame_position_tracking_view_controller.h.
Ogre::SceneNode* rviz::FramePositionTrackingViewController::target_scene_node_ [protected] |
Definition at line 94 of file frame_position_tracking_view_controller.h.