Go to the documentation of this file.
30 #ifndef OGRE_TOOLS_ORBIT_CAMERA_H_
31 #define OGRE_TOOLS_ORBIT_CAMERA_H_
72 void zoom(
float amount);
97 void yaw(
float angle)
override;
98 void pitch(
float angle)
override;
99 void roll(
float angle)
override;
101 void setPosition(
float x,
float y,
float z)
override;
102 void move(
float x,
float y,
float z)
override;
107 void lookAt(
const Ogre::Vector3& point)
override;
109 void mouseLeftDrag(
int diff_x,
int diff_y,
bool ctrl,
bool alt,
bool shift)
override;
110 void mouseMiddleDrag(
int diff_x,
int diff_y,
bool ctrl,
bool alt,
bool shift)
override;
111 void mouseRightDrag(
int diff_x,
int diff_y,
bool ctrl,
bool alt,
bool shift)
override;
112 void scrollWheel(
int diff,
bool ctrl,
bool alt,
bool shift)
override;
127 void fromString(
const std::string& str)
override;
An orbital camera, controlled by yaw, pitch, distance, and focal point.
float yaw_
The camera's yaw (rotation around the y-axis), in radians.
Ogre::Quaternion getOrientation() override
Get the orientation of this camera.
void mouseRightDown(int x, int y) override
void mouseMiddleDrag(int diff_x, int diff_y, bool ctrl, bool alt, bool shift) override
Handle a middle mouse button drag.
void mouseLeftDrag(int diff_x, int diff_y, bool ctrl, bool alt, bool shift) override
Handle a left mouse button drag.
void normalizeYaw()
Normalizes the camera's yaw in the range [0, 2*pi)
void setOrientation(float x, float y, float z, float w) override
Set the orientation of the camera from a quaternion.
void lookAt(const Ogre::Vector3 &point) override
Point the camera at the specified point.
Ogre::Vector3 getGlobalFocalPoint()
void setPosition(float x, float y, float z) override
Set the position of the camera.
Generic interface for a camera.
void setFocalPoint(const Ogre::Vector3 &focal_point)
Set the focal point of the camera. Keeps the pitch/yaw/distance the same.
void move(float x, float y, float z) override
Move the camera relative to its orientation.
Ogre::Vector3 getPosition() override
Get the position of this camera.
void zoom(float amount)
Move in/out from the focal point, ie. adjust distance_ by amount.
void pitch(float angle) override
Pitch the camera.
void calculatePitchYawFromPosition(const Ogre::Vector3 &position)
Calculates pitch and yaw values given a new position and the current focal point.
void scrollWheel(int diff, bool ctrl, bool alt, bool shift) override
Handle a scrollwheel change.
void mouseRightUp(int x, int y) override
Shape * focal_point_object_
void update() override
Calculates the camera's position and orientation from the yaw, pitch, distance and focal point.
float pitch_
The camera's pitch (rotation around the x-axis), in radians.
void mouseMiddleDown(int x, int y) override
void yaw(float angle) override
Yaw the camera.
void roll(float angle) override
Roll the camera.
float distance_
The camera's distance from the focal point.
const Ogre::Vector3 & getFocalPoint()
OrbitCamera(Ogre::SceneManager *scene_manager)
void mouseMiddleUp(int x, int y) override
Ogre::Vector3 focal_point_
The camera's focal point.
std::string toString() override
Returns a string representation of the camera's configuration.
void mouseRightDrag(int diff_x, int diff_y, bool ctrl, bool alt, bool shift) override
Handle a right mouse button drag.
void mouseLeftDown(int x, int y) override
void fromString(const std::string &str) override
Loads the camera's configure from the supplied string (generated through toString())
void normalizePitch()
Normalizes the camera's pitch, preventing it from reaching vertical (or turning upside down)
void mouseLeftUp(int x, int y) override
void setFrom(CameraBase *camera) override
Set the position/orientation of this camera from another camera.
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:10