syBR::Game::Camera Class Reference

Camera actor class. More...

#include <Camera.hpp>

List of all members.

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.
PhysicsWorldm_pPhysicsWorld
 Physics world.
Ogre::Camera * m_pCamera
 Camera to use.
bool m_physics
 One of these:
  • true if the actor is included in the physical simulation
  • false otherwise.

float m_mass
 Mass of the actor.
float m_radius
 Radius of the sphere of the camera.

Friends

class Scene
class SceneNode


Detailed Description

Camera actor class.

It is a 3D camera included in a scene.


Constructor & Destructor Documentation

syBR::Game::Camera::Camera ( const std::string &  name,
PhysicsWorld pPhysicsWorld 
) [private]

Constructor.

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


Member Function Documentation

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

Get camera name.

Returns:
Camera name

const float syBR::Game::Camera::getNearClipDistance (  )  const

Get the near clip distance.

Returns:
Near clip distance

void syBR::Game::Camera::setNearClipDistance ( const float  nearDistance  ) 

Set the near clip distance.

Parameters:
nearDistance Near clip distance value to set

const float syBR::Game::Camera::getFarClipDistance (  )  const

Get the far clip distance.

Returns:
Far clip distance
Note:
A far clip distance of 0.0 means an infinite view distance

void syBR::Game::Camera::setFarClipDistance ( const float  farDistance  ) 

Set the far clip distance.

Parameters:
farDistance Far clip distance value to set
Note:
A far clip distance of 0.0 means an infinite view distance

const float syBR::Game::Camera::getAspectRatio (  )  const

Get the aspect ratio.

Returns:
Aspect ratio between the x and y dimensions of the frustum viewport

void syBR::Game::Camera::setAspectRatio ( const float  ratio  ) 

Set the aspect ratio.

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

Returns:
Vertical field-of-view (in degrees)

void syBR::Game::Camera::setVerticalFOV ( const float  fov  ) 

Set the vertical field-of-view.

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

Returns:
One of these:
  • true if it is included in the physics simulation
  • false otherwise

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.

Parameters:
affected One of these:
  • true to include the camera in the physics simulation
  • false otherwise
mass Mass of the camera
radius Radius of the camera


Friends And Related Function Documentation

friend class Scene [friend]

friend class SceneNode [friend]


Member Data Documentation

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.


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

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008