30 #ifndef RVIZ_ORBIT_VIEW_CONTROLLER_H 31 #define RVIZ_ORBIT_VIEW_CONTROLLER_H 33 #include <OgreVector3.h> 78 void zoom(
float amount);
80 void pitch(
float angle);
81 void move(
float x,
float y,
float z);
85 void lookAt(
const Ogre::Vector3& point)
override;
87 void reset()
override;
97 void update(
float dt,
float ros_dt)
override;
99 const Ogre::Quaternion& old_reference_orientation)
override;
127 #endif // RVIZ_VIEW_CONTROLLER_H
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. ...
void update(float dt, float ros_dt) override
Called at 30Hz by ViewManager::update() while this view is active. Override with code that needs to r...
FloatProperty * pitch_property_
The camera's pitch (rotation around the x-axis), in radians.
void onTargetFrameChanged(const Ogre::Vector3 &old_reference_position, const Ogre::Quaternion &old_reference_orientation) override
Override to implement the change in properties which nullifies the change in target frame...
Base class of ViewControllers which have a "Target Frame" which is a TF frame whose position they tra...
void mimic(ViewController *source_view) override
Configure the settings of this view controller to give, as much as possible, a similar view as that g...
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 updateCamera()
Property specialized to enforce floating point max/min.
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.
void handleMouseEvent(ViewportMouseEvent &evt) override
void lookAt(const Ogre::Vector3 &point) override
This should be implemented in each subclass to aim the camera at the given point in space (relative t...
void onInitialize() override
Do subclass-specific initialization. Called by ViewController::initialize after context_, target_scene_node_, and camera_ are set.
~OrbitViewController() override
FloatProperty * yaw_property_
The camera's yaw (rotation around the y-axis), in radians.
Property specialized to provide getter for booleans.
void move(float x, float y, float z)