ViewingParameters Class Reference

Class representing a collection of parameters for viewing a 3D scene. More...

#include <ViewingParameters.h>

List of all members.

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.


Detailed Description

Class representing a collection of parameters for viewing a 3D scene.

Constructor & Destructor Documentation

ViewingParameters::ViewingParameters (  ) 

Constructor of the ViewingParameters class.

Constructors and Destructors.

ViewingParameters::~ViewingParameters (  ) 

Destructor of the ViewingParameters class.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

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.

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.

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.

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.


Member Data Documentation

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.


The documentation for this class was generated from the following files:

Generated on Wed Feb 24 15:01:03 2010 for Frapper by  doxygen 1.5.9