Camera Class Reference

Camera helper. More...

Collaboration diagram for Camera:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Camera (irr::scene::ICameraSceneNode *camera, Object *target, World *world)
 ctor
virtual void update ()
 Update the camera.
virtual bool event (const irr::SEvent &e)
 Event handler.
irr::scene::ICameraSceneNode * getNode () const
const irr::core::vector3df & getDirection () const
float getYaw () const
float getPitch () const


Detailed Description

Camera helper.

The purpose of this class is to manage a camera scene node to follow a game object (most probably a character) either in 1st or 3rd person view.

It handles collision with the environment when in 3rd person view to avoid walls to stand between the target object and the camera.


Constructor & Destructor Documentation

Camera::Camera ( irr::scene::ICameraSceneNode *  camera,
Object target,
World world 
)

ctor

Parameters:
camera camera scene node to manage
target game object to follow
world World in which the game object evolves


Member Function Documentation

void Camera::update (  )  [virtual]

Update the camera.

The camera scene node position and target are affected. The target object may be affected (rotation in 3rd person view)

References Object::getBody(), Object::getCenterOfMassPosition(), World::getDynamicsWorld(), and Object::update().

bool Camera::event ( const irr::SEvent &  e  )  [virtual]

Event handler.

Change the position (3rd person view) or the target (1st person view) of the camera based on mouse input

References World::getDevice().

irr::scene::ICameraSceneNode * Camera::getNode (  )  const

Returns:
The managed camera scene node

const irr::core::vector3df & Camera::getDirection (  )  const

Returns:
the current direction of the camera

float Camera::getYaw (  )  const

Returns:
Yaw value (3rd person view)

float Camera::getPitch (  )  const

Returns:
Picth value (3rd person view)


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

Generated on Sat Jul 26 13:58:39 2008 for TFK:GE by  doxygen 1.5.5