An un-constrained "flying" camera, specified by an eye point, focus point, and up vector. More...
#include <tablet_view_controller.h>
Public Types | |
enum | { TRANSITION_LINEAR = 0, TRANSITION_SPHERICAL } |
Public Member Functions | |
virtual void | handleMouseEvent (rviz::ViewportMouseEvent &evt) |
virtual void | lookAt (const Ogre::Vector3 &point) |
Calls beginNewTransition() to move the focus point to the point provided, assumed to be in the Rviz Fixed Frame. More... | |
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. More... | |
void | move_eye (float x, float y, float z) |
Applies a translation to only the eye point. More... | |
void | move_focus_and_eye (float x, float y, float z) |
Applies a translation to the focus and eye points. More... | |
void | moveEyeWithFocusTo (const Ogre::Vector3 &point) |
Calls beginNewTransition() to move the eye to the point given, keeping the direction fixed. More... | |
virtual void | onActivate () |
called by activate(). More... | |
virtual void | onInitialize () |
Do subclass-specific initialization. Called by ViewController::initialize after context_ and camera_ are set. More... | |
void | orbitCameraTo (const Ogre::Vector3 &point) |
Calls beginNewTransition() with the focus point fixed, moving the eye to the point given. More... | |
virtual void | reset () |
Resets the camera parameters to a sane value. More... | |
TabletViewController () | |
virtual void | transitionFrom (ViewController *previous_view) |
Called by ViewManager when this ViewController is being made current. More... | |
void | yaw_pitch_roll (float yaw, float pitch, float roll) |
Applies a body-fixed-axes sequence of rotations; only accurate for small angles. More... | |
virtual | ~TabletViewController () |
Public Member Functions inherited from rviz::ViewController | |
void | activate () |
void | emitConfigChanged () |
Ogre::Camera * | getCamera () const |
virtual QString | getClassId () const |
virtual QCursor | getCursor () |
QVariant | getViewData (int column, int role) const override |
Qt::ItemFlags | getViewFlags (int column) const override |
virtual void | handleKeyEvent (QKeyEvent *event, RenderPanel *panel) |
void | initialize (DisplayContext *context) |
bool | isActive () const |
void | load (const Config &config) override |
void | lookAt (float x, float y, float z) |
void | save (Config config) const override |
virtual void | setClassId (const QString &class_id) |
ViewController () | |
~ViewController () override | |
Public Member Functions inherited from rviz::Property | |
virtual void | addChild (Property *child, int index=-1) |
Property * | childAt (int index) const |
virtual Property * | childAtUnchecked (int index) const |
virtual void | collapse () |
std::enable_if<!QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type | connect (const QObject *context, Func &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
QMetaObject::Connection | connect (const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection) |
std::enable_if< QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type | connect (const R *receiver, Func &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
std::enable_if<!QtPrivate::FunctionPointer< Func >::IsPointerToMemberFunction, QMetaObject::Connection >::type | connect (Func &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
bool | contains (Property *possible_child) const |
virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option) |
virtual void | expand () |
virtual QString | getDescription () const |
virtual bool | getDisableChildren () |
virtual bool | getHidden () const |
virtual QIcon | getIcon () const |
PropertyTreeModel * | getModel () const |
virtual QString | getName () const |
std::string | getNameStd () const |
Property * | getParent () const |
virtual bool | getReadOnly () const |
virtual QVariant | getValue () const |
void | hide () |
void | insertChildSorted (Property *child) |
bool | isAncestorOf (Property *possible_child) const |
virtual void | moveChild (int from_index, int to_index) |
virtual int | numChildren () const |
virtual bool | paint (QPainter *painter, const QStyleOptionViewItem &option) const |
Property (const QString &name, const QVariant &default_value, const QString &description, P *parent, Func &&changed_slot) | |
Property (const QString &name, const QVariant &default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver) | |
Property (const QString &name=QString(), const QVariant &default_value=QVariant(), const QString &description=QString(), Property *parent=nullptr) | |
virtual void | removeChildren (int start_index=0, int count=-1) |
int | rowNumberInParent () const |
virtual void | setDescription (const QString &description) |
virtual void | setHidden (bool hidden) |
virtual void | setIcon (const QIcon &icon) |
void | setModel (PropertyTreeModel *model) |
virtual void | setName (const QString &name) |
void | setParent (Property *new_parent) |
virtual void | setReadOnly (bool read_only) |
void | setShouldBeSaved (bool save) |
virtual bool | setValue (const QVariant &new_value) |
bool | shouldBeSaved () const |
void | show () |
virtual Property * | subProp (const QString &sub_name) |
Property * | takeChild (Property *child) |
virtual Property * | takeChildAt (int index) |
~Property () override | |
Protected Slots | |
virtual void | onDistancePropertyChanged () |
Called when distance property is changed; computes new eye position. More... | |
virtual void | onEyePropertyChanged () |
Called when eye property is changed; computes new distance. More... | |
virtual void | onFocusPropertyChanged () |
Called focus property is changed; computes new distance. More... | |
virtual void | onUpPropertyChanged () |
Called when up vector property is changed (does nothing for now...). More... | |
virtual void | updateAttachedFrame () |
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(). More... | |
void | updateMousePointPublishTopics () |
void | updatePublishTopics () |
void | updateTopics () |
Protected Member Functions | |
Ogre::Vector3 | attachedLocalToFixedFrame (const Ogre::Vector3 &v) |
void | beginNewTransition (const Ogre::Vector3 &eye, const Ogre::Vector3 &focus, const Ogre::Vector3 &up, const ros::Duration &transition_time) |
Begins a camera movement animation to the given goal points. More... | |
void | cameraPlacementCallback (const view_controller_msgs::CameraPlacementConstPtr &cp_ptr) |
void | cancelTransition () |
Cancels any currently active camera movement. More... | |
void | connectPositionProperties () |
Convenience function; connects the signals/slots for position properties. More... | |
void | disconnectPositionProperties () |
Convenience function; disconnects the signals/slots for position properties. More... | |
Ogre::Vector3 | fixedFrameToAttachedLocal (const Ogre::Vector3 &v) |
float | getDistanceFromCameraToFocalPoint () |
Return the distance between camera and focal point. More... | |
Ogre::Quaternion | getOrientation () |
Return a Quaternion. More... | |
virtual void | onAttachedFrameChanged (const Ogre::Vector3 &old_reference_position, const Ogre::Quaternion &old_reference_orientation) |
Override to implement the change in properties which nullifies the change in attached frame. More... | |
void | publishCurrentPlacement () |
void | publishMouseEvent (rviz::ViewportMouseEvent &event) |
void | setPropertiesFromCamera (Ogre::Camera *source_camera) |
void | transformCameraPlacementToAttachedFrame (view_controller_msgs::CameraPlacement &cp) |
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. More... | |
void | updateAttachedSceneNode () |
Update the position of the attached_scene_node_ from the TF frame specified in the Attached Frame property. More... | |
void | updateCamera () |
Updates the Ogre camera properties from the view controller properties. More... | |
Protected Member Functions inherited from rviz::ViewController | |
void | setCursor (CursorType cursor_type) |
void | setCursor (QCursor cursor) |
void | setStatus (const QString &message) |
Protected Member Functions inherited from rviz::Property | |
void | loadValue (const Config &config) |
Additional Inherited Members | |
Signals inherited from rviz::ViewController | |
void | configChanged () |
Signals inherited from rviz::Property | |
void | aboutToChange () |
void | changed () |
void | childListChanged (Property *this_property) |
Static Public Member Functions inherited from rviz::ViewController | |
static QString | formatClassId (const QString &class_id) |
Protected Types inherited from rviz::ViewController | |
enum | CursorType |
An un-constrained "flying" camera, specified by an eye point, focus point, and up vector.
Definition at line 64 of file tablet_view_controller.h.
anonymous enum |
Enumerator | |
---|---|
TRANSITION_LINEAR | |
TRANSITION_SPHERICAL |
Definition at line 69 of file tablet_view_controller.h.
jsk_rviz_plugins::TabletViewController::TabletViewController | ( | ) |
Definition at line 102 of file tablet_view_controller.cpp.
|
virtual |
Definition at line 154 of file tablet_view_controller.cpp.
|
inlineprotected |
Definition at line 193 of file tablet_view_controller.h.
|
protected |
Begins a camera movement animation to the given goal points.
Definition at line 585 of file tablet_view_controller.cpp.
|
protected |
Definition at line 619 of file tablet_view_controller.cpp.
|
protected |
Cancels any currently active camera movement.
Definition at line 614 of file tablet_view_controller.cpp.
|
protected |
Convenience function; connects the signals/slots for position properties.
Definition at line 263 of file tablet_view_controller.cpp.
|
protected |
Convenience function; disconnects the signals/slots for position properties.
Definition at line 271 of file tablet_view_controller.cpp.
|
inlineprotected |
Definition at line 192 of file tablet_view_controller.h.
|
protected |
Return the distance between camera and focal point.
Definition at line 362 of file tablet_view_controller.cpp.
|
protected |
Return a Quaternion.
Definition at line 836 of file tablet_view_controller.cpp.
|
virtual |
Reimplemented from rviz::ViewController.
Definition at line 386 of file tablet_view_controller.cpp.
|
virtual |
Calls beginNewTransition() to move the focus point to the point provided, assumed to be in the Rviz Fixed Frame.
Reimplemented from rviz::ViewController.
Definition at line 719 of file tablet_view_controller.cpp.
|
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::ViewController.
Definition at line 540 of file tablet_view_controller.cpp.
void jsk_rviz_plugins::TabletViewController::move_eye | ( | float | x, |
float | y, | ||
float | z | ||
) |
Applies a translation to only the eye point.
Definition at line 848 of file tablet_view_controller.cpp.
void jsk_rviz_plugins::TabletViewController::move_focus_and_eye | ( | float | x, |
float | y, | ||
float | z | ||
) |
Applies a translation to the focus and eye points.
Definition at line 841 of file tablet_view_controller.cpp.
void jsk_rviz_plugins::TabletViewController::moveEyeWithFocusTo | ( | const Ogre::Vector3 & | point | ) |
Calls beginNewTransition() to move the eye to the point given, keeping the direction fixed.
Definition at line 741 of file tablet_view_controller.cpp.
|
virtual |
called by activate().
This version calls updateAttachedSceneNode().
Reimplemented from rviz::ViewController.
Definition at line 243 of file tablet_view_controller.cpp.
|
protectedvirtual |
Override to implement the change in properties which nullifies the change in attached frame.
Definition at line 342 of file tablet_view_controller.cpp.
|
protectedvirtualslot |
Called when distance property is changed; computes new eye position.
Definition at line 289 of file tablet_view_controller.cpp.
|
protectedvirtualslot |
Called when eye property is changed; computes new distance.
Definition at line 279 of file tablet_view_controller.cpp.
|
protectedvirtualslot |
Called focus property is changed; computes new distance.
Definition at line 284 of file tablet_view_controller.cpp.
|
virtual |
Do subclass-specific initialization. Called by ViewController::initialize after context_ and camera_ are set.
This version sets up the attached_scene_node, focus shape, and subscribers.
Reimplemented from rviz::ViewController.
Definition at line 227 of file tablet_view_controller.cpp.
|
protectedvirtualslot |
Called when up vector property is changed (does nothing for now...).
Definition at line 297 of file tablet_view_controller.cpp.
void jsk_rviz_plugins::TabletViewController::orbitCameraTo | ( | const Ogre::Vector3 & | point | ) |
Calls beginNewTransition() with the focus point fixed, moving the eye to the point given.
Definition at line 734 of file tablet_view_controller.cpp.
|
protected |
Definition at line 186 of file tablet_view_controller.cpp.
|
protected |
Definition at line 172 of file tablet_view_controller.cpp.
|
virtual |
Resets the camera parameters to a sane value.
Implements rviz::ViewController.
Definition at line 367 of file tablet_view_controller.cpp.
|
protected |
Definition at line 525 of file tablet_view_controller.cpp.
|
protected |
Definition at line 690 of file tablet_view_controller.cpp.
|
virtual |
Called by ViewManager when this ViewController is being made current.
previous_view | is the previous "current" view, and will not be NULL. |
This gives ViewController subclasses an opportunity to implement a smooth transition from a previous viewpoint to the new viewpoint.
Reimplemented from rviz::ViewController.
Definition at line 568 of file tablet_view_controller.cpp.
|
protectedvirtual |
Called at 30Hz by ViewManager::update() while this view is active. Override with code that needs to run repeatedly.
Reimplemented from rviz::ViewController.
Definition at line 749 of file tablet_view_controller.cpp.
|
protectedvirtualslot |
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 314 of file tablet_view_controller.cpp.
|
protected |
Update the position of the attached_scene_node_ from the TF frame specified in the Attached Frame property.
Definition at line 324 of file tablet_view_controller.cpp.
|
protected |
Updates the Ogre camera properties from the view controller properties.
Definition at line 785 of file tablet_view_controller.cpp.
|
protectedslot |
Definition at line 166 of file tablet_view_controller.cpp.
|
protectedslot |
Definition at line 160 of file tablet_view_controller.cpp.
|
protectedslot |
Definition at line 217 of file tablet_view_controller.cpp.
void jsk_rviz_plugins::TabletViewController::yaw_pitch_roll | ( | float | yaw, |
float | pitch, | ||
float | roll | ||
) |
Applies a body-fixed-axes sequence of rotations; only accurate for small angles.
Definition at line 794 of file tablet_view_controller.cpp.
|
protected |
Definition at line 231 of file tablet_view_controller.h.
|
protected |
Definition at line 224 of file tablet_view_controller.h.
|
protected |
Definition at line 225 of file tablet_view_controller.h.
|
protected |
Definition at line 220 of file tablet_view_controller.h.
|
protected |
Definition at line 219 of file tablet_view_controller.h.
|
protected |
Definition at line 237 of file tablet_view_controller.h.
|
protected |
A default time for any animation requests.
Definition at line 217 of file tablet_view_controller.h.
|
protected |
The camera's distance from the focal point.
Definition at line 213 of file tablet_view_controller.h.
|
protected |
A flag indicating the dragging state of the mouse.
Definition at line 240 of file tablet_view_controller.h.
|
protected |
The position of the camera.
Definition at line 214 of file tablet_view_controller.h.
|
protected |
If True, "up" is fixed to ... up.
Definition at line 211 of file tablet_view_controller.h.
|
protected |
A small ellipsoid to show the focus point.
Definition at line 239 of file tablet_view_controller.h.
|
protected |
The point around which the camera "orbits".
Definition at line 215 of file tablet_view_controller.h.
|
protected |
Definition at line 233 of file tablet_view_controller.h.
|
protected |
Definition at line 232 of file tablet_view_controller.h.
|
protected |
Definition at line 234 of file tablet_view_controller.h.
|
protected |
A cursor for indicating mouse interaction is disabled.
Definition at line 242 of file tablet_view_controller.h.
|
protected |
Select between Orbit or FPS control style.
Definition at line 210 of file tablet_view_controller.h.
|
protected |
If True, most user changes to camera state are disabled.
Definition at line 209 of file tablet_view_controller.h.
|
protected |
Definition at line 221 of file tablet_view_controller.h.
|
protected |
Definition at line 249 of file tablet_view_controller.h.
|
protected |
Definition at line 207 of file tablet_view_controller.h.
|
protected |
Definition at line 247 of file tablet_view_controller.h.
|
protected |
Definition at line 245 of file tablet_view_controller.h.
|
protected |
Used to store the orientation of the attached frame relative to <Fixed Frame>
Definition at line 227 of file tablet_view_controller.h.
|
protected |
Used to store the position of the attached frame relative to <Fixed Frame>
Definition at line 228 of file tablet_view_controller.h.
|
protected |
Definition at line 233 of file tablet_view_controller.h.
|
protected |
Definition at line 232 of file tablet_view_controller.h.
|
protected |
Definition at line 234 of file tablet_view_controller.h.
|
protected |
Definition at line 235 of file tablet_view_controller.h.
|
protected |
Definition at line 236 of file tablet_view_controller.h.
|
protected |
The up vector for the camera.
Definition at line 216 of file tablet_view_controller.h.