#include <cameraManager.h>
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 |
| |
| int | index () const |
| |
| int | type () const |
| |
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 CVector3D & | pos () const |
| Get the postion of the current camera. | |
| const CAngle3D & | ang () const |
| Get the angle of the current camera. | |
Selection methods | |
| void | next () |
| Rotate to the next camera. | |
| void | prev () |
| Rotate to the previous camera. | |
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.
| bool CCameraManager::load | ( | const std::string & | filepath | ) |
Add all cameras from the given xml filename.
| filepath | Full path of the xml data file. |
| bool CCameraManager::load | ( | const std::string & | filename, | |
| const std::string & | path | |||
| ) |
Add all cameras from the given xml filename.
| filename | Name of the xml data file. | |
| path | Path that data file is in. |
| bool CCameraManager::load | ( | CXMLNode | node | ) |
Add all cameras using elements from the given XML node.
| node | XML node with camera data. |
| int CCameraManager::add | ( | int | type | ) |
add a camera of "type"
Add a camera to the end of the camera array.
| type | An camera id enum (int). |
| int CCameraManager::add | ( | CCameraBase * | camera | ) |
add a camera
Add a camera to the end of the camera array.
| camera | Pointer to a camera |
| int CCameraManager::remove | ( | int | num = 0 |
) |
Remove a camera from the list.
| num | The index of the camera to be remove (default 0) (int). |
| bool CCameraManager::update | ( | ) |
Update using the current camera.
update using the current camera
| void CCameraManager::set_target | ( | ENTITY * | ent, | |
| float | x, | |||
| float | y, | |||
| float | z | |||
| ) | [inline] |
Set the camera target to an entity
| ent | Pointer to a valid ENTITY. | |
| x | Offset in X. | |
| y | Offset in Y. | |
| z | Offset in Z. |
| void CCameraManager::set_target | ( | const CVector3D & | vec | ) |
Set the camera target to an vector postion
| vec | is a CVector3D& |
| void CCameraManager::set_vec | ( | const CVector3D & | vec | ) |
Set the position of the current camera.
| vec | is a CVector3D& |
| void CCameraManager::set_ang | ( | const CAngle3D & | ang | ) |
Set the angle of the current camera.
| ang | is a CVector3D& |
| void CCameraManager::next | ( | ) | [inline] |
| void CCameraManager::prev | ( | ) | [inline] |
1.5.4