#include <ViewingParameters.h>
Public Member Functions | |
| ViewingParameters () | |
| Constructor of the ViewingParameters class. | |
| ~ViewingParameters () | |
| Destructor of the ViewingParameters class. | |
| void | reset () |
| Resets the viewing parameter's to the default view. | |
| void | translate (float dx, float dy) |
| Translates the camera by the given translation values. | |
| void | rotate (float dPhi, float dTheta) |
| Modifies the camera's viewing angles by the given angle values. | |
| void | dolly (float delta, bool wheel=false) |
| Dollies the camera by the given delta value. | |
| void | update () |
| Updates the viewing parameters according to the currently set viewing angles. | |
| void | applyTo (ViewingParameters *viewingParameters) |
| Applies the current viewing parameters to the given viewing parameters. | |
| void | applyTo (Node *node) |
| Applies the current viewing parameters to the parameters of the given node. | |
| void | applyTo (Ogre::SceneNode *sceneNode, bool lookAtOrigin=false, bool center=false) |
| Applies the current viewing parameters to the given scene node. | |
| void | applyTo (Ogre::Camera *camera) |
| Applies the current viewing parameters to the given camera. | |
| void | applyFrom (Node *node) |
| Applies the current viewing parameters from the given node to the this viewing parameters. | |
| unsigned int | getCanvasWidth () const |
| Returns the width of the canvas stored in the viewing parameters. | |
| unsigned int | getCanvasHeight () const |
| Returns the height of the canvas stored in the viewing parameters. | |
| void | setCanvasSize (unsigned int width, unsigned int height) |
| Sets the size of the canvas to store in the viewing parameters. | |
Private Attributes | |
| Ogre::Real | m_viewRadius |
| Spherical coordinate Rho used to calculate the eye point of the camera. | |
| Ogre::Degree | m_viewAnglePhi |
| Spherical coordinate Phi used to calculate the eye point of the camera. | |
| Ogre::Degree | m_viewAngleTheta |
| Spherical coordinate Theta used to calculate the eye point of the camera. | |
| Ogre::Vector3 | m_eye |
| The camera's position in 3D space. | |
| Ogre::Vector3 | m_center |
| The position to look at in 3D space. | |
| Ogre::Vector3 | m_up |
| The viewing up vector in 3D space. | |
| Ogre::Radian | m_fieldOfView |
| The camera's field of view setting. | |
| Ogre::Real | m_nearClipping |
| The camera's near clipping plane value. | |
| Ogre::Real | m_farClipping |
| The camera's far clipping plane value. | |
| unsigned int | m_canvasWidth |
| The width of the canvas stored in the viewing parameters. | |
| unsigned int | m_canvasHeight |
| The height of the canvas stored in the viewing parameters. | |
| ViewingParameters::ViewingParameters | ( | ) |
Constructor of the ViewingParameters class.
Constructors and Destructors.
| ViewingParameters::~ViewingParameters | ( | ) |
Destructor of the ViewingParameters class.
| void ViewingParameters::reset | ( | ) |
Resets the viewing parameter's to the default view.
Public Functions.
| void ViewingParameters::translate | ( | float | dx, | |
| float | dy | |||
| ) |
Translates the camera by the given translation values.
| dx | The translation to apply in X. | |
| dy | The translation to apply in Y. |
| void ViewingParameters::rotate | ( | float | phi, | |
| float | theta | |||
| ) |
Modifies the camera's viewing angles by the given angle values.
| dPhi | The angle by which to rotate the viewing phi angle. | |
| dTheta | The angle by which to rotate the viewing theta angle. | |
| phi | The angle by which to rotate the viewing phi angle. | |
| theta | The angle by which to rotate the viewing theta angle. |
| void ViewingParameters::dolly | ( | float | delta, | |
| bool | wheel = false | |||
| ) |
Dollies the camera by the given delta value.
| delta | The delta value to apply to the viewing radius. | |
| wheel | Flag to control whether to dolly by mouse wheel. |
| void ViewingParameters::update | ( | ) |
Updates the viewing parameters according to the currently set viewing angles.
| void ViewingParameters::applyTo | ( | ViewingParameters * | viewingParameters | ) |
Applies the current viewing parameters to the given viewing parameters.
| viewingParameters | The target instance to apply the viewing parameters to. |
| void ViewingParameters::applyTo | ( | Node * | node | ) |
Applies the current viewing parameters to the parameters of the given node.
| node | The node to apply the viewing parameters to. |
| void ViewingParameters::applyTo | ( | Ogre::SceneNode * | sceneNode, | |
| bool | lookAtOrigin = false, |
|||
| bool | center = false | |||
| ) |
Applies the current viewing parameters to the given scene node.
| sceneNode | The scene node to apply the viewing parameters to. | |
| lookAtOrigin | Flag to control whether the scene node should be oriented towards the coordinate system's origin. | |
| center | Flag to control whether to place the scene node at the coordinate system's origin. |
| void ViewingParameters::applyTo | ( | Ogre::Camera * | camera | ) |
Applies the current viewing parameters to the given camera.
| camera | The camera to apply the viewing parameters to. |
| void ViewingParameters::applyFrom | ( | Node * | node | ) |
Applies the current viewing parameters from the given node to the this viewing parameters.
| node | The node to apply the viewing parameters from. |
| unsigned int ViewingParameters::getCanvasWidth | ( | ) | const |
Returns the width of the canvas stored in the viewing parameters.
| unsigned int ViewingParameters::getCanvasHeight | ( | ) | const |
Returns the height of the canvas stored in the viewing parameters.
| void ViewingParameters::setCanvasSize | ( | unsigned int | width, | |
| unsigned int | height | |||
| ) |
Sets the size of the canvas to store in the viewing parameters.
| width | The width of the canvas to store in the viewing parameters. | |
| height | The height of the canvas to store in the viewing parameters. |
Ogre::Real ViewingParameters::m_viewRadius [private] |
Spherical coordinate Rho used to calculate the eye point of the camera.
Ogre::Degree ViewingParameters::m_viewAnglePhi [private] |
Spherical coordinate Phi used to calculate the eye point of the camera.
Ogre::Degree ViewingParameters::m_viewAngleTheta [private] |
Spherical coordinate Theta used to calculate the eye point of the camera.
Ogre::Vector3 ViewingParameters::m_eye [private] |
The camera's position in 3D space.
Ogre::Vector3 ViewingParameters::m_center [private] |
The position to look at in 3D space.
Ogre::Vector3 ViewingParameters::m_up [private] |
The viewing up vector in 3D space.
Ogre::Radian ViewingParameters::m_fieldOfView [private] |
The camera's field of view setting.
Ogre::Real ViewingParameters::m_nearClipping [private] |
The camera's near clipping plane value.
Ogre::Real ViewingParameters::m_farClipping [private] |
The camera's far clipping plane value.
unsigned int ViewingParameters::m_canvasWidth [private] |
The width of the canvas stored in the viewing parameters.
unsigned int ViewingParameters::m_canvasHeight [private] |
The height of the canvas stored in the viewing parameters.
1.5.9