NL3D::CTravCameraScene Class Reference

#include <trav_scene.h>

Inheritance diagram for NL3D::CTravCameraScene:

NL3D::CTraversal NL3D::CClipTrav NL3D::CLoadBalancingTrav NL3D::CRenderTrav

Detailed Description

A ITravScene traversal, with camera setup (common to CRenderTrav and CClipTrav).

Definition at line 67 of file trav_scene.h.

Public Member Functions

 CTravCameraScene ()
 Constructor.

void setCamMatrix (const NLMISC::CMatrix &camMatrix)
 Setup the camera matrix (a translation/rotation matrix).

void setFrustum (float width, float height, float znear, float zfar, bool perspective=true)
 Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective).

void setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective=true)
 Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective).


Data Fields

CSceneScene

Protected Member Functions

void update ()
 update the dependent information.


Constructor & Destructor Documentation

NL3D::CTravCameraScene::CTravCameraScene  )  [inline]
 

Constructor.

Definition at line 109 of file trav_scene.h.

References CamLook, CamMatrix, CamPos, NLMISC::CMatrix::identity(), and setFrustum().

00110         {
00111                 setFrustum(1.0f, 1.0f, 0.01f, 1.0f);
00112                 CamMatrix.identity();
00113                 ViewMatrix.identity();
00114                 CamPos= NLMISC::CVector::Null;
00115                 CamLook= NLMISC::CVector::Null;
00116         }


Member Function Documentation

void NL3D::CTravCameraScene::setCamMatrix const NLMISC::CMatrix camMatrix  )  [inline]
 

Setup the camera matrix (a translation/rotation matrix).

Definition at line 102 of file trav_scene.h.

References CamMatrix.

Referenced by NL3D::CScene::render().

00103         {
00104                 CamMatrix= camMatrix;
00105         }

void NL3D::CTravCameraScene::setFrustum float  width,
float  height,
float  znear,
float  zfar,
bool  perspective = true
[inline]
 

Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective).

Definition at line 97 of file trav_scene.h.

References height, setFrustum(), and width.

00098         {
00099                 setFrustum(-width/2, width/2, -height/2, height/2, znear, zfar, perspective);
00100         }

void NL3D::CTravCameraScene::setFrustum float  left,
float  right,
float  bottom,
float  top,
float  znear,
float  zfar,
bool  perspective = true
[inline]
 

Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective).

Definition at line 86 of file trav_scene.h.

References Bottom, Far, Near, Perspective, and Right.

Referenced by CTravCameraScene(), NL3D::CScene::render(), and setFrustum().

00087         {
00088                 Left= left;
00089                 Right= right;
00090                 Bottom= bottom;
00091                 Top= top;
00092                 Near= znear;
00093                 Far= zfar;
00094                 Perspective= perspective;
00095         }

void NL3D::CTravCameraScene::update  )  [inline, protected]
 

update the dependent information.

Definition at line 122 of file trav_scene.h.

References CamLook, CamMatrix, CamPos, NLMISC::CMatrix::getPos(), NLMISC::CMatrix::inverted(), and NLMISC::CMatrix::mulVector().

00123         {
00124                 ViewMatrix= CamMatrix.inverted();
00125                 CamPos= CamMatrix.getPos();
00126                 CamLook= CamMatrix.mulVector(NLMISC::CVector::J);
00127         }


Field Documentation

float NL3D::CTravCameraScene::Bottom
 

Definition at line 75 of file trav_scene.h.

Referenced by setFrustum(), NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender().

NLMISC::CVector NL3D::CTravCameraScene::CamLook
 

Definition at line 80 of file trav_scene.h.

Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), CTravCameraScene(), and update().

NLMISC::CMatrix NL3D::CTravCameraScene::CamMatrix
 

Definition at line 77 of file trav_scene.h.

Referenced by CTravCameraScene(), setCamMatrix(), NL3D::CWaterModel::traverseRender(), NL3D::CFlareModel::traverseRender(), and update().

NLMISC::CVector NL3D::CTravCameraScene::CamPos
 

Definition at line 79 of file trav_scene.h.

Referenced by NL3D::CTransformShape::clip(), NL3D::CQuadGridClipClusterQTreeNode::clip(), NL3D::CLandscapeModel::clipAndRenderLandscape(), NL3D::CSkeletonModel::computeDisplayLodCharacterPriority(), CTravCameraScene(), NL3D::CWaterModel::doSimpleRender(), NL3D::CQuadGridClipClusterQTreeNode::noFrustumClip(), NL3D::CCluster::recursTraverseClip(), NL3D::CScene::render(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshGeom::render(), NL3D::CSkeletonModel::renderCLod(), NL3D::CMeshMRMGeom::renderSkin(), NL3D::CMeshGeom::renderSkin(), NL3D::CShadowMapManager::selectShadowMapsToGenerate(), NL3D::CSkeletonModel::traverseAnimDetail(), NL3D::CParticleSystemModel::traverseClip(), NL3D::CTransformShape::traverseLoadBalancingPass0(), NL3D::CWaterModel::traverseRender(), and update().

float NL3D::CTravCameraScene::Far
 

Definition at line 75 of file trav_scene.h.

Referenced by NL3D::CWaterModel::computeClippedPoly(), setFrustum(), NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender().

float NL3D::CTravCameraScene::Left
 

Definition at line 75 of file trav_scene.h.

Referenced by NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender().

float NL3D::CTravCameraScene::Near
 

Definition at line 75 of file trav_scene.h.

Referenced by NL3D::CWaterModel::computeClippedPoly(), setFrustum(), NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender().

bool NL3D::CTravCameraScene::Perspective
 

Definition at line 76 of file trav_scene.h.

Referenced by setFrustum().

float NL3D::CTravCameraScene::Right
 

Definition at line 75 of file trav_scene.h.

Referenced by NL3D::CWaterModel::computeClippedPoly(), setFrustum(), NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender().

CScene* NL3D::CTraversal::Scene [inherited]
 

Definition at line 55 of file trav_scene.h.

Referenced by NL3D::CScene::CScene(), NL3D::CMeshMRMSkinnedGeom::profileSceneRender(), NL3D::CMeshMRMGeom::profileSceneRender(), and NL3D::CMeshGeom::profileSceneRender().

float NL3D::CTravCameraScene::Top
 

Definition at line 75 of file trav_scene.h.

Referenced by NL3D::CWaterModel::computeClippedPoly(), NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender().

NLMISC::CMatrix NL3D::CTravCameraScene::ViewMatrix
 

Definition at line 78 of file trav_scene.h.

Referenced by NL3D::CWaterModel::computeClippedPoly(), NL3D::CParticleSystemModel::doAnimate(), NL3D::CWaterModel::traverseRender(), and NL3D::CFlareModel::traverseRender().


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 08:18:49 2004 for NeL by doxygen 1.3.6