CCameraManager Class Reference

Camera Manager class. More...

#include <cameraManager.h>

List of all members.

Public Member Functions

bool update ()
 Update using the current camera.
Create methods
 CCameraManager ()
 ~CCameraManager ()
Load methods
bool load (const std::string &filepath)
 Add all cameras from the given xml filename.
bool load (const std::string &filename, const std::string &path)
 Add all cameras from the given xml filename.
bool load (CXMLNode node)
 Add all cameras using elements from the given XML node.
Info methods
int size () const
 
Returns:
The current size of the camera array.

int index () const
 
Returns:
The current index into the camera array.

int type () const
 
Returns:
The type of the current camera.

Add/Remove methods
int add (int type)
 add a camera of "type"
int add (CCameraBase *camera)
 add a camera
int remove (int num=0)
Set/Get methods
void set_target (ENTITY *ent, float x, float y, float z)
void set_target (const CVector3D &vec)
void set_vec (const CVector3D &vec)
void set_ang (const CAngle3D &ang)
const CVector3Dpos () const
 Get the postion of the current camera.
const CAngle3Dang () const
 Get the angle of the current camera.
Selection methods
void next ()
 Rotate to the next camera.
void prev ()
 Rotate to the previous camera.


Detailed Description

Camera Manager class.

The Camera Manager class:

(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.

Author:
Doug Poston
Version:
1.3
Date:
12/28/2007

Member Function Documentation

bool CCameraManager::load ( const std::string &  filepath  ) 

Add all cameras from the given xml filename.

Parameters:
filepath Full path of the xml data file.
Returns:
true if Data file is loaded.

bool CCameraManager::load ( const std::string &  filename,
const std::string &  path 
)

Add all cameras from the given xml filename.

Parameters:
filename Name of the xml data file.
path Path that data file is in.
Returns:
true if Data file is loaded.

bool CCameraManager::load ( CXMLNode  node  ) 

Add all cameras using elements from the given XML node.

Parameters:
node XML node with camera data.
Returns:
true if Data file is loaded.

int CCameraManager::add ( int  type  ) 

add a camera of "type"

Add a camera to the end of the camera array.

Parameters:
type An camera id enum (int).
Returns:
The current size of camera array.
See also:
remove(int num = 0)

add(CCameraBase* camera)

int CCameraManager::add ( CCameraBase camera  ) 

add a camera

Add a camera to the end of the camera array.

Parameters:
camera Pointer to a camera
Returns:
The current size of camera array
See also:
remove(int num = 0)

add(int type)

int CCameraManager::remove ( int  num = 0  ) 

Remove a camera from the list.

Parameters:
num The index of the camera to be remove (default 0) (int).
Returns:
Current size of camera array.
See also:
remove(int num = 0)

bool CCameraManager::update (  ) 

Update using the current camera.

update using the current camera

Note:
Call once per frame.

void CCameraManager::set_target ( ENTITY *  ent,
float  x,
float  y,
float  z 
) [inline]

Set the camera target to an entity

Parameters:
ent Pointer to a valid ENTITY.
x Offset in X.
y Offset in Y.
z Offset in Z.
See also:
set_target(CVector3D& vec)

void CCameraManager::set_target ( const CVector3D vec  ) 

Set the camera target to an vector postion

Parameters:
vec is a CVector3D&
See also:
set_target(ENTITY* ent)

void CCameraManager::set_vec ( const CVector3D vec  ) 

Set the position of the current camera.

Parameters:
vec is a CVector3D&
See also:
set_ang(CVector3D& ent)

void CCameraManager::set_ang ( const CAngle3D ang  ) 

Set the angle of the current camera.

Parameters:
ang is a CVector3D&
See also:
set_vec(CVector3D& vec)

void CCameraManager::next (  )  [inline]

Rotate to the next camera.

See also:
prev()

void CCameraManager::prev (  )  [inline]

Rotate to the previous camera.

See also:
next()


The documentation for this class was generated from the following files:
Generated on Fri Dec 28 12:55:07 2007 for template7 by  doxygen 1.5.4