#include <Camera.h>


Public Member Functions | |
| Camera (int w, int h) | |
| Constructs a new Camera. | |
| Camera (const std::string &name, int w, int h) | |
| Constructs a new named Camera. | |
| void | resizeView (int x, int y) |
| Used to resize the Camera view. | |
| void | applyCameraTransformation () |
| Applies the camera transformation to the rendering stack. | |
| void | removeCameraTransformation () |
| Applies the inverse camera transformation to the rendering stack. | |
Protected Member Functions | |
| virtual void | camera_resize (int x, int y)=0 |
| Implemented by sub-classes to set up the camera when the view is resized. | |
Protected Attributes | |
| int | width |
| Current window width. | |
| int | height |
| Current window height. | |
This Camera class serves as a virtual base class for specific camera implementation (see below).
The Camera class is used by the user, or by a SceneNode to apply camera transformations to a scene. Since a Camera is a type of Node it can be attached within the scene graph in order to follow objects or create other effects.
| Camera::Camera | ( | int | w, | |
| int | h | |||
| ) |
Constructs a new Camera.
Requires the width and height of the window.
| w | window width | |
| h | window height |
| Camera::Camera | ( | const std::string & | name, | |
| int | w, | |||
| int | h | |||
| ) |
| void Camera::resizeView | ( | int | x, | |
| int | y | |||
| ) |
Used to resize the Camera view.
Should be called on all Cameras when the window is resized. This method calls the protected camera_resize(int,int) pure virtual method then assigns the new window width and height to protected members Camera::width and Camera::height.
| w | window width | |
| h | window height |
| virtual void Camera::camera_resize | ( | int | x, | |
| int | y | |||
| ) | [protected, pure virtual] |
Implemented by sub-classes to set up the camera when the view is resized.
| w | window width | |
| h | window height |
Implemented in OrthoCamera.
int Camera::width [protected] |
Current window width.
Set by the resizeView(int,int) method.
int Camera::height [protected] |
Current window height.
Set by the resizeView(int,int) method.
1.5.5