#include <Camera.h>
Collaboration diagram for Camera:

Public Member Functions | |
| Camera () | |
| Creates a camera in (0,0,0) with the CAMERA_GAME_MAIN mode. | |
| void | setup () |
| Set up the camera (i.e. | |
| void | setMode (CameraMode mode) |
| Set the mode of the camera. | |
| void | setTrack (Sprite *new_track) |
| Set the sprite the camera should look at. | |
| void | setFollow (Sprite *new_follow) |
| Set the sprite the camera should follow. | |
| float | getFrustumDepth (void) |
| Returns the depth of the frustum. | |
| void | setFrustumDepth (float depth) |
| Sets the depth of the frustum. | |
Public Attributes | |
| Sprite * | follow |
| The camera should follow this object. | |
| Sprite * | track |
| The camera should look at this object. | |
| float | where [3] |
| Where the camera is now. | |
| float | frustum_depth |
| How far the camera sees. | |
| float | spin |
| float | tilt |
| float | dist |
| used when in rotation mode | |
| CameraMode | currentMode |
| Mode of the camera. | |
Protected Member Functions | |
| void | gameSetup () |
| void | paneSetup (bool firstTime) |
| void | binocularSetup (void) |
A camera object can contain logic and as such be able to do nice pans and sweeps or follow objects.
Before the scene is drawn the current cameras setup() method should be called.
| Camera::Camera | ( | ) |
Creates a camera in (0,0,0) with the CAMERA_GAME_MAIN mode.
| void Camera::binocularSetup | ( | void | ) | [protected] |
| void Camera::gameSetup | ( | ) | [protected] |
| float Camera::getFrustumDepth | ( | void | ) |
Returns the depth of the frustum.
| void Camera::paneSetup | ( | bool | firstTime | ) | [protected] |
| void Camera::setFollow | ( | Sprite * | new_follow | ) |
Set the sprite the camera should follow.
| void Camera::setFrustumDepth | ( | float | depth | ) |
Sets the depth of the frustum.
| void Camera::setMode | ( | CameraMode | mode | ) |
Set the mode of the camera.
| void Camera::setTrack | ( | Sprite * | new_track | ) |
Set the sprite the camera should look at.
| void Camera::setup | ( | ) |
Set up the camera (i.e.
MV-matrix etc for the current mode.
Mode of the camera.
| float Camera::dist |
used when in rotation mode
The camera should follow this object.
| float Camera::frustum_depth |
How far the camera sees.
| float Camera::spin |
| float Camera::tilt |
The camera should look at this object.
| float Camera::where[3] |
Where the camera is now.
1.4.7