30 #ifndef OGRE_TOOLS_ORBIT_CAMERA_H_ 31 #define OGRE_TOOLS_ORBIT_CAMERA_H_ 34 #include <OgreVector3.h> 72 void zoom(
float amount );
77 void setFocalPoint(
const Ogre::Vector3& focal_point );
85 virtual void yaw(
float angle );
86 virtual void pitch(
float angle );
87 virtual void roll(
float angle );
88 virtual void setOrientation(
float x,
float y,
float z,
float w );
89 virtual void setPosition(
float x,
float y,
float z );
90 virtual void move(
float x,
float y,
float z );
92 virtual Ogre::Vector3 getPosition();
93 virtual Ogre::Quaternion getOrientation();
95 virtual void lookAt(
const Ogre::Vector3& point );
97 virtual void mouseLeftDrag(
int diff_x,
int diff_y,
bool ctrl,
bool alt,
bool shift );
98 virtual void mouseMiddleDrag(
int diff_x,
int diff_y,
bool ctrl,
bool alt,
bool shift );
99 virtual void mouseRightDrag(
int diff_x,
int diff_y,
bool ctrl,
bool alt,
bool shift );
100 virtual void scrollWheel(
int diff,
bool ctrl,
bool alt,
bool shift );
107 virtual void mouseLeftDown(
int x,
int y );
108 virtual void mouseMiddleDown(
int x,
int y );
109 virtual void mouseRightDown(
int x,
int y );
110 virtual void mouseLeftUp(
int x,
int y );
111 virtual void mouseMiddleUp(
int x,
int y );
112 virtual void mouseRightUp(
int x,
int y );
114 virtual void fromString(
const std::string& str);
115 virtual std::string toString();
119 Ogre::Vector3 getGlobalFocalPoint();
125 void calculatePitchYawFromPosition(
const Ogre::Vector3& position );
129 void normalizePitch();
float distance_
The camera's distance from the focal point.
const Ogre::Vector3 & getFocalPoint()
Ogre::Vector3 focal_point_
The camera's focal point.
Generic interface for a camera.
TFSIMD_FORCE_INLINE const tfScalar & y() const
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
Shape * focal_point_object_
TFSIMD_FORCE_INLINE const tfScalar & x() const
float pitch_
The camera's pitch (rotation around the x-axis), in radians.
TFSIMD_FORCE_INLINE const tfScalar & z() const
TFSIMD_FORCE_INLINE const tfScalar & w() const
float yaw_
The camera's yaw (rotation around the y-axis), in radians.
An orbital camera, controlled by yaw, pitch, distance, and focal point.