#include <ortho_camera.h>
Public Member Functions | |
virtual void | fromString (const std::string &str) |
Loads the camera's configure from the supplied string (generated through toString()) | |
virtual Ogre::Quaternion | getOrientation () |
Get the orientation of this camera. | |
virtual Ogre::Vector3 | getPosition () |
Get the position of this camera. | |
virtual void | lookAt (const Ogre::Vector3 &point) |
Point the camera at the specified point. | |
virtual void | mouseLeftDrag (int diff_x, int diff_y, bool ctrl, bool alt, bool shift) |
Handle a left mouse button drag. | |
virtual void | mouseMiddleDrag (int diff_x, int diff_y, bool ctrl, bool alt, bool shift) |
Handle a middle mouse button drag. | |
virtual void | mouseRightDrag (int diff_x, int diff_y, bool ctrl, bool alt, bool shift) |
Handle a right mouse button drag. | |
virtual void | move (float x, float y, float z) |
Move the camera relative to its orientation. | |
OrthoCamera (QtOgreRenderWindow *render_window, Ogre::SceneManager *scene_manager) | |
virtual void | pitch (float angle) |
Pitch the camera. | |
virtual void | roll (float angle) |
Roll the camera. | |
virtual void | scrollWheel (int diff, bool ctrl, bool alt, bool shift) |
Handle a scrollwheel change. | |
virtual void | setFrom (CameraBase *camera) |
Set the position/orientation of this camera from another camera. | |
virtual void | setOrientation (float x, float y, float z, float w) |
Set the orientation of the camera from a quaternion. | |
virtual void | setPosition (float x, float y, float z) |
Set the position of the camera. | |
virtual std::string | toString () |
Returns a string representation of the camera's configuration. | |
virtual void | update () |
virtual void | yaw (float angle) |
Yaw the camera. | |
virtual | ~OrthoCamera () |
Private Attributes | |
QtOgreRenderWindow * | render_window_ |
float | scale_ |
Definition at line 42 of file ortho_camera.h.
ogre_tools::OrthoCamera::OrthoCamera | ( | QtOgreRenderWindow * | render_window, |
Ogre::SceneManager * | scene_manager | ||
) |
Definition at line 45 of file ortho_camera.cpp.
ogre_tools::OrthoCamera::~OrthoCamera | ( | ) | [virtual] |
Definition at line 58 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::fromString | ( | const std::string & | str | ) | [virtual] |
Loads the camera's configure from the supplied string (generated through toString())
str | The string to load from |
Implements ogre_tools::CameraBase.
Definition at line 145 of file ortho_camera.cpp.
Ogre::Quaternion ogre_tools::OrthoCamera::getOrientation | ( | ) | [virtual] |
Get the orientation of this camera.
Implements ogre_tools::CameraBase.
Definition at line 87 of file ortho_camera.cpp.
Ogre::Vector3 ogre_tools::OrthoCamera::getPosition | ( | ) | [virtual] |
Get the position of this camera.
Implements ogre_tools::CameraBase.
Definition at line 82 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::lookAt | ( | const Ogre::Vector3 & | point | ) | [virtual] |
Point the camera at the specified point.
point | The point to look at |
Implements ogre_tools::CameraBase.
Definition at line 112 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::mouseLeftDrag | ( | int | diff_x, |
int | diff_y, | ||
bool | ctrl, | ||
bool | alt, | ||
bool | shift | ||
) | [virtual] |
Handle a left mouse button drag.
diff_x | Pixels the mouse has moved in the (window space) x direction |
diff_y | Pixels the mouse has moved in the (window space) y direction |
Implements ogre_tools::CameraBase.
Definition at line 121 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::mouseMiddleDrag | ( | int | diff_x, |
int | diff_y, | ||
bool | ctrl, | ||
bool | alt, | ||
bool | shift | ||
) | [virtual] |
Handle a middle mouse button drag.
diff_x | Pixels the mouse has moved in the (window space) x direction |
diff_y | Pixels the mouse has moved in the (window space) y direction |
Implements ogre_tools::CameraBase.
Definition at line 126 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::mouseRightDrag | ( | int | diff_x, |
int | diff_y, | ||
bool | ctrl, | ||
bool | alt, | ||
bool | shift | ||
) | [virtual] |
Handle a right mouse button drag.
diff_x | Pixels the mouse has moved in the (window space) x direction |
diff_y | Pixels the mouse has moved in the (window space) y direction |
Implements ogre_tools::CameraBase.
Definition at line 131 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::move | ( | float | x, |
float | y, | ||
float | z | ||
) | [virtual] |
Move the camera relative to its orientation.
x | Distance to move along the X-axis |
y | Distance to move along the Y-axis |
z | Distance to move along the Z-axis |
Implements ogre_tools::CameraBase.
Definition at line 102 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::pitch | ( | float | angle | ) | [virtual] |
Pitch the camera.
Calls to pitch are cumulative, so: pitch(PI); pitch(PI);
is equivalent to pitch(2*PI);
angle | Angle to pitch, in radians |
Implements ogre_tools::CameraBase.
Definition at line 72 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::roll | ( | float | angle | ) | [virtual] |
Roll the camera.
Calls to roll are cumulative, so: roll(PI); roll(PI);
is equivalent to roll(2*PI);
angle | Angle to roll, in radians |
Implements ogre_tools::CameraBase.
Definition at line 77 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::scrollWheel | ( | int | diff, |
bool | ctrl, | ||
bool | alt, | ||
bool | shift | ||
) | [virtual] |
Handle a scrollwheel change.
diff | Number of "units" the scrollwheel has moved |
Implements ogre_tools::CameraBase.
Definition at line 138 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::setFrom | ( | CameraBase * | camera | ) | [virtual] |
Set the position/orientation of this camera from another camera.
camera | The camera to set from |
Implements ogre_tools::CameraBase.
Definition at line 92 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::setOrientation | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) | [virtual] |
Set the orientation of the camera from a quaternion.
Implements ogre_tools::CameraBase.
Definition at line 97 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::setPosition | ( | float | x, |
float | y, | ||
float | z | ||
) | [virtual] |
Set the position of the camera.
Implements ogre_tools::CameraBase.
Definition at line 107 of file ortho_camera.cpp.
std::string ogre_tools::OrthoCamera::toString | ( | ) | [virtual] |
Returns a string representation of the camera's configuration.
Implements ogre_tools::CameraBase.
Definition at line 175 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::update | ( | ) | [virtual] |
Implements ogre_tools::CameraBase.
Definition at line 62 of file ortho_camera.cpp.
void ogre_tools::OrthoCamera::yaw | ( | float | angle | ) | [virtual] |
Yaw the camera.
Calls to yaw are cumulative, so: yaw(PI); yaw(PI);
is equivalent to yaw(2*PI);
angle | Angle to yaw, in radians |
Implements ogre_tools::CameraBase.
Definition at line 67 of file ortho_camera.cpp.
Definition at line 73 of file ortho_camera.h.
float ogre_tools::OrthoCamera::scale_ [private] |
Definition at line 72 of file ortho_camera.h.