sgCamera Class Reference

#include <sgCamera.h>

List of all members.

Public Member Functions

 sgCamera (sgCamera *p, sgCamera *n)
sgCameracreateCamera ()
sgVector3 projectDir (sgVector3 dir)
void destroy ()
void destroyAll ()
void updateProj ()
void updateView ()

Public Attributes

float arc
float aspect
float clipnear
float clipfar
sgVector3 position
sgQuaternion rotation
sgMatrix4x4 matproj
sgMatrix4x4 matview
sgCameraprev
sgCameranext

Detailed Description

Camera class. Responsible for camera handling.


Constructor & Destructor Documentation

sgCamera::sgCamera ( sgCamera p,
sgCamera n 
)

Constructor. Creates a camera.

Parameters:
p the previous camera in the linked camera list
n the next camera in the linked camera list

Member Function Documentation

sgCamera * sgCamera::createCamera (  ) 

Create camera. Creates a new camera and makes it next of this.

Returns:
pointer to the new camera
void sgCamera::destroy (  ) 

Destroy. Destroys this camera.

void sgCamera::destroyAll (  ) 

Destroy All. Destroys this and all cameras connected to it.

sgVector3 sgCamera::projectDir ( sgVector3  dir  ) 

Project direction. Transforms the vector with the camera transformation matrix.

Returns:
dir the vector to transform
void sgCamera::updateProj (  ) 

Update projection. Updates this cameras projection matrix. This function has to be called after making changes to arc, aspect or the far and near clipping planes.

void sgCamera::updateView (  ) 

Update view. Updates this cameras view transformation matrix. This function is called automatically before rendering.


Member Data Documentation

Arc. The cameras field of view.

Aspect ratio. The cameras aspect ratio.

Far clipping plane dist. The distance of the far clipping plane of this camera.

Near clipping plane dist. The distance of the near clipping plane of this camera.

Camera window size. The size of the window the camera is rendered into. Camera window position. The position the cameras window is rendered at. Projection matrix. The transformation matrix for this cameras projection.

View matrix. The transformation matrix of this camera.

Next. Pointer to the next camera within the cameras list or NULL if there is none.

Position. The position of the camera.

Previous. Pointer to the previous camera within the cameras list or NULL if there is none.

Rotation. The rotation of the camera as quaternion.


The documentation for this class was generated from the following files:
Generated on Thu Jun 3 13:31:04 2010 for iSDGE by  doxygen 1.6.3