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

Camera Class Reference
[Scene Graph]

#include <lvt/Camera.h>

Inheritance diagram for Camera:

Inheritance graph
[legend]
List of all members.

Detailed Description

A camera in 3-space.

Camera is an abstract class that is the base for both PerspectiveCamera and OrthographicCamera. These classes are used to define the view on a scenegraph and the projection for rendering onto the screen.


Public Member Functions

virtual void FitToWnd (int width, int height)=0
 Adjusts the camera to fit the shape of a window.
float GetFarDistance ()
 Returns the distance to the far clip plane.
float GetNearDistance ()
 Returns the distance to the near clip plane.
virtual void Render ()=0
 "Draws" the camera
void SetFarDistance (float farDist)
 Sets the distance to the far clip plane.
void SetNearDistance (float nearDist)
 Sets the distance to the near clip plane.
void LookAt (float x, float y, float z)
 Points the camera towards the given point.
void LookAt (const Vec &target)
 Points the camera towards the given point.
void SetOrientation (float x, float y, float z)
 Specifies the direction of the up vector.
void SetOrientation (const Vec &orient)
 Specifies the direction of the up vector.
void SetPosition (float x, float y, float z)
 Sets the camera's position.
void SetPosition (const Vec &pos)
 Sets the camera's position.


Member Function Documentation

virtual void FitToWnd int  width,
int  height
[pure 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.

Implemented in OrthographicCamera, and PerspectiveCamera.

float GetFarDistance  )  [inline]
 

Returns the distance to the far clip plane.

float GetNearDistance  )  [inline]
 

Returns the distance to the near clip plane.

void LookAt float  x,
float  y,
float  z
[inline]
 

Points the camera towards the given point.

void LookAt const Vec target  )  [inline]
 

Points the camera towards the given point.

virtual void Render  )  [pure virtual]
 

"Draws" the camera

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

Implements Node.

Implemented in OrthographicCamera, and PerspectiveCamera.

void SetFarDistance float  farDist  )  [inline]
 

Sets the distance to the far clip plane.

void SetNearDistance float  nearDist  )  [inline]
 

Sets the distance to the near clip plane.

void SetOrientation float  x,
float  y,
float  z
[inline]
 

Specifies the direction of the up vector.

void SetOrientation const Vec orient  )  [inline]
 

Specifies the direction of the up vector.

void SetPosition float  x,
float  y,
float  z
[inline]
 

Sets the camera's position.

void SetPosition const Vec pos  )  [inline]
 

Sets the camera's position.


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