30 #ifndef RVIZ_ORBIT_VIEW_CONTROLLER_H 31 #define RVIZ_ORBIT_VIEW_CONTROLLER_H 33 #include <OgreVector3.h> 77 void zoom(
float amount );
79 void pitch(
float angle );
80 void move(
float x,
float y,
float z );
84 virtual void lookAt(
const Ogre::Vector3& point );
96 virtual void update(
float dt,
float ros_dt);
97 virtual void onTargetFrameChanged(
const Ogre::Vector3& old_reference_position,
const Ogre::Quaternion& old_reference_orientation);
125 #endif // RVIZ_VIEW_CONTROLLER_H virtual ~OrbitViewController()
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 r...
FloatProperty * distance_property_
The camera's distance from the focal point.
void calculatePitchYawFromPosition(const Ogre::Vector3 &position)
Calculates pitch and yaw values given a new position and the current focal point. ...
virtual void mimic(ViewController *source_view)
Configure the settings of this view controller to give, as much as possible, a similar view as that g...
FloatProperty * pitch_property_
The camera's pitch (rotation around the x-axis), in radians.
Base class of ViewControllers which have a "Target Frame" which is a TF frame whose position they tra...
void updateFocalShapeSize()
Calculates the focal shape size and update it's geometry.
void zoom(float amount)
Move in/out from the focal point, ie. adjust #distance_ by amount.
virtual void handleMouseEvent(ViewportMouseEvent &evt)
virtual void updateCamera()
Property specialized to enforce floating point max/min.
TFSIMD_FORCE_INLINE const tfScalar & y() const
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...
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
BoolProperty * focal_shape_fixed_size_property_
Whether the focal shape size is fixed or not.
An orbital camera, controlled by yaw, pitch, distance, and focal point.
VectorProperty * focal_point_property_
The point around which the camera "orbits".
FloatProperty * focal_shape_size_property_
The focal shape size.
TFSIMD_FORCE_INLINE const tfScalar & x() const
virtual void onInitialize()
Do subclass-specific initialization. Called by ViewController::initialize after context_, target_scene_node_, and camera_ are set.
TFSIMD_FORCE_INLINE const tfScalar & z() const
FloatProperty * yaw_property_
The camera's yaw (rotation around the y-axis), in radians.
Property specialized to provide getter for booleans.
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 t...
void move(float x, float y, float z)