Camera Class Reference
[Cameras]

Camera base class Node. More...

#include <Camera.h>

Inheritance diagram for Camera:

Inheritance graph
[legend]
Collaboration diagram for Camera:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

Camera base class Node.

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.

See also:
SceneNode, OrthoCamera

Constructor & Destructor Documentation

Camera::Camera ( int  w,
int  h 
)

Constructs a new Camera.

Requires the width and height of the window.

Parameters:
w window width
h window height

Camera::Camera ( const std::string &  name,
int  w,
int  h 
)

Constructs a new named Camera.

Requires the width and height of the window.

Parameters:
name name of this Node
w window width
h window height


Member Function Documentation

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.

Parameters:
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.

Parameters:
w window width
h window height

Implemented in OrthoCamera.


Member Data Documentation

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.


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

Generated on Fri Feb 22 15:56:19 2008 for Scene2D by  doxygen 1.5.5