Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Class Members

PerspectiveCamera Class Reference
[Scene Graph]

#include <lvt/Camera.h>

Inheritance diagram for PerspectiveCamera:

Inheritance graph
[legend]
List of all members.

Detailed Description

A perspective camera.


Public Member Functions

virtual void FitToWnd (int width, int height)
 Adjusts the camera to fit the shape of a window.
float GetAspectRatio ()
 Returns the camera's aspect ratio.
float GetFOV ()
 Returns the camera's field of view.
void Render ()
 "Draws" the camera
void SetAspectRatio (float aspectRatio)
 Sets the camera's aspect ratio.
void SetFOV (float fov)
 Sets the camera's field of view.


Member Function Documentation

virtual void FitToWnd int  width,
int  height
[virtual]
 

Adjusts the camera to fit the shape of a window.

When a camera is attached to a Wnd via Wnd::AdjustCamera, the Wnd object will call this member function when it is resized.

It is not usually necessary to call this method manually.

Implements Camera.

float GetAspectRatio  )  [inline]
 

Returns the camera's aspect ratio.

In general, the aspect ratio of a camera should match the aspect ratio of the viewport. Wnd::AdjustCamera can be used to ensure that the two are consistent.

float GetFOV  )  [inline]
 

Returns the camera's field of view.

void Render  )  [virtual]
 

"Draws" the camera

Sets the view on the scene, and initializes the OpenGL projection matrix.

Implements Camera.

void SetAspectRatio float  aspectRatio  )  [inline]
 

Sets the camera's aspect ratio.

The aspect ratio that determines the field of view in the x direction.

void SetFOV float  fov  )  [inline]
 

Sets the camera's field of view.

The field of view is the angle, in degrees, in the y-direction that determines the vertical size of the view plane.

See the man page for gluPerspective, or chapter 3 of the OpenGL Programming Guide for more information.


Generated on Thu Feb 17 09:45:47 2005 for liblvt by  doxygen 1.4.1