#include <Camera.hpp>
Public Member Functions | |
void | update (const bool preUpdate) |
Update the camera. | |
const std::string & | getName () const |
Get camera name. | |
const float | getNearClipDistance () const |
Get the near clip distance. | |
void | setNearClipDistance (const float near) |
Set the near clip distance. | |
const float | getFarClipDistance () const |
Get the far clip distance. | |
void | setFarClipDistance (const float far) |
Set the far clip distance. | |
const float | getAspectRatio () const |
Get the aspect ratio. | |
void | setAspectRatio (const float ratio) |
Set the aspect ratio. | |
const float | getVerticalFOV () const |
Get the vertical field-of-view. | |
void | setVerticalFOV (const float fov) |
Set the vertical field-of-view. | |
const bool | getPhysicsState () const |
Retrieve whether the camera is included in the physical simulation or not. | |
const float | getPhysicsMass () const |
Get the mass of the camera. | |
const float | getPhysicsRadius () const |
Get the radius of the sphere of the camera. | |
void | setPhysicsProperties (const bool affected, const float mass, const float radius) |
Set physics properties of the camera. | |
Private Member Functions | |
Camera (const std::string &name, PhysicsWorld *pPhysicsWorld) | |
Constructor. | |
~Camera () | |
Destructor. | |
Private Attributes | |
Ogre::SceneManager * | m_pRenderSceneManager |
Ogre scene manager to be used for rendering. | |
std::string | m_name |
Name of the camera. | |
PhysicsWorld * | m_pPhysicsWorld |
Physics world. | |
Ogre::Camera * | m_pCamera |
Camera to use. | |
bool | m_physics |
One of these:
| |
float | m_mass |
Mass of the actor. | |
float | m_radius |
Radius of the sphere of the camera. | |
Friends | |
class | Scene |
class | SceneNode |
It is a 3D camera included in a scene.
syBR::Game::Camera::Camera | ( | const std::string & | name, | |
PhysicsWorld * | pPhysicsWorld | |||
) | [private] |
Constructor.
name | Name of the camera | |
pPhysicsWorld | Pointer to the physics world where the camera is located |
syBR::Game::Camera::~Camera | ( | ) | [private] |
Destructor.
Release used resources.
void syBR::Game::Camera::update | ( | const bool | preUpdate | ) |
Update the camera.
Check if the physics simulation made changes to the position and / or orientation of the camera
const std::string & syBR::Game::Camera::getName | ( | ) | const |
const float syBR::Game::Camera::getNearClipDistance | ( | ) | const |
Get the near clip distance.
void syBR::Game::Camera::setNearClipDistance | ( | const float | nearDistance | ) |
Set the near clip distance.
nearDistance | Near clip distance value to set |
const float syBR::Game::Camera::getFarClipDistance | ( | ) | const |
Get the far clip distance.
void syBR::Game::Camera::setFarClipDistance | ( | const float | farDistance | ) |
Set the far clip distance.
farDistance | Far clip distance value to set |
const float syBR::Game::Camera::getAspectRatio | ( | ) | const |
Get the aspect ratio.
void syBR::Game::Camera::setAspectRatio | ( | const float | ratio | ) |
Set the aspect ratio.
ratio | Aspect ratio between the x and y dimensions of the frustum viewport to set |
const float syBR::Game::Camera::getVerticalFOV | ( | ) | const |
Get the vertical field-of-view.
void syBR::Game::Camera::setVerticalFOV | ( | const float | fov | ) |
Set the vertical field-of-view.
fov | Vertical field-of-view to set (in degrees) |
const bool syBR::Game::Camera::getPhysicsState | ( | ) | const |
Retrieve whether the camera is included in the physical simulation or not.
const float syBR::Game::Camera::getPhysicsMass | ( | ) | const |
Get the mass of the camera.
return Mass of the camera
const float syBR::Game::Camera::getPhysicsRadius | ( | ) | const |
Get the radius of the sphere of the camera.
return Radius of the sphere of the camera
void syBR::Game::Camera::setPhysicsProperties | ( | const bool | affected, | |
const float | mass, | |||
const float | radius | |||
) |
Set physics properties of the camera.
affected | One of these:
| |
mass | Mass of the camera | |
radius | Radius of the camera |
friend class Scene [friend] |
friend class SceneNode [friend] |
Ogre::SceneManager* syBR::Game::Camera::m_pRenderSceneManager [private] |
Ogre scene manager to be used for rendering.
std::string syBR::Game::Camera::m_name [private] |
Name of the camera.
PhysicsWorld* syBR::Game::Camera::m_pPhysicsWorld [private] |
Physics world.
Ogre::Camera* syBR::Game::Camera::m_pCamera [private] |
Camera to use.
bool syBR::Game::Camera::m_physics [private] |
One of these:
float syBR::Game::Camera::m_mass [private] |
Mass of the actor.
float syBR::Game::Camera::m_radius [private] |
Radius of the sphere of the camera.
Copyright © 2008 by Sebastien Frippiat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008