newspeoplefor developersdocumentationdownloads

nCamera2 Class Reference
[Graphics System]

#include <ncamera2.h>

List of all members.


Detailed Description

Hold camera attributes for nGfxServer2.

Technically this sets the projection matrix. The camera's position and orientation have to be set by the View matrix which can be done using nGfxServer2::SetTransform().

(C) 2002 RadonLabs GmbH

Definition at line 23 of file ncamera2.h.


Public Types

enum  ClipStatus {
  Outside,
  Inside,
  Clipped
}
 clip status More...
enum  Type {
  Perspective,
  Orthogonal,
  ProjMatrixSet
}
 type More...

Public Member Functions

 nCamera2 ()
 default constructor
 nCamera2 (float aov, float aspect, float nearp, float farp)
 arg constructor
void SetPerspective (float aov, float aspect, float nearp, float farp)
 set perspective projection parameters
void SetOrthogonal (float w, float h, float nearp, float farp)
 set orthogonal projection parameters
void SetProjectionMatrix (const matrix44 &projMatrix)
 set the maya projection matrix
void SetType (Type t)
 set projection type
Type GetType () const
 get projection type
void SetWidth (float w)
 set view volume width (ortho only)
float GetWidth () const
 get view volume width (ortho only)
void SetHeight (float h)
 set view volume height (ortho only)
float GetHeight () const
 get view volume height (ortho only)
void SetAngleOfView (float a)
 set angle of view in degree
float GetAngleOfView () const
 get angle of view
void SetAspectRatio (float r)
 set horizontal/vertical aspect ratio (i.e. (4.0 / 3.0))
float GetAspectRatio () const
 get aspect ratio
void SetNearPlane (float v)
 set near clip plane
float GetNearPlane () const
 get near clip plane
void SetFarPlane (float v)
 set far clip plane
float GetFarPlane () const
 set far clip plane
void SetShadowOffset (float v)
 set shadow offset, used by shadow projection matrix to move clip planes
float GetShadowOffset () const
 get shadow offset, used by shadow projection matrix to move clip planes
const matrix44GetProjection ()
 get a projection matrix representing the camera
const matrix44GetInvProjection ()
 get the inverse of the projection
const matrix44GetShadowProjection ()
 get the shadow projection matrix
const bbox3GetBox ()
 get a bounding box enclosing the camera
void GetViewVolume (float &minx, float &maxx, float &miny, float &maxy, float &minz, float &maxz) const
 Get the view volume.
ClipStatus GetClipStatus (const matrix44 &myTransform, const matrix44 &otherViewProjection)
 check if 2 view volumes intersect

Member Enumeration Documentation

enum nCamera2::ClipStatus
 

clip status

Enumerator:
Outside 
Inside 
Clipped 

Definition at line 27 of file ncamera2.h.

enum nCamera2::Type
 

type

Enumerator:
Perspective 
Orthogonal 
ProjMatrixSet 

Definition at line 35 of file ncamera2.h.


Constructor & Destructor Documentation

nCamera2::nCamera2  )  [inline]
 

default constructor

Definition at line 122 of file ncamera2.h.

nCamera2::nCamera2 float  aov,
float  aspect,
float  nearp,
float  farp
[inline]
 

arg constructor

Definition at line 141 of file ncamera2.h.


Member Function Documentation

void nCamera2::SetPerspective float  aov,
float  aspect,
float  nearp,
float  farp
[inline]
 

set perspective projection parameters

Definition at line 161 of file ncamera2.h.

void nCamera2::SetOrthogonal float  w,
float  h,
float  nearp,
float  farp
[inline]
 

set orthogonal projection parameters

Definition at line 177 of file ncamera2.h.

void nCamera2::SetProjectionMatrix const matrix44 projMatrix  )  [inline]
 

set the maya projection matrix

Definition at line 193 of file ncamera2.h.

void nCamera2::SetType Type  t  )  [inline]
 

set projection type

Definition at line 208 of file ncamera2.h.

nCamera2::Type nCamera2::GetType  )  const [inline]
 

get projection type

Definition at line 220 of file ncamera2.h.

void nCamera2::SetWidth float  w  )  [inline]
 

set view volume width (ortho only)

Definition at line 230 of file ncamera2.h.

float nCamera2::GetWidth  )  const [inline]
 

get view volume width (ortho only)

Definition at line 242 of file ncamera2.h.

void nCamera2::SetHeight float  h  )  [inline]
 

set view volume height (ortho only)

Definition at line 252 of file ncamera2.h.

float nCamera2::GetHeight  )  const [inline]
 

get view volume height (ortho only)

Definition at line 264 of file ncamera2.h.

void nCamera2::SetAngleOfView float  a  )  [inline]
 

set angle of view in degree

Definition at line 274 of file ncamera2.h.

float nCamera2::GetAngleOfView  )  const [inline]
 

get angle of view

Definition at line 286 of file ncamera2.h.

void nCamera2::SetAspectRatio float  r  )  [inline]
 

set horizontal/vertical aspect ratio (i.e. (4.0 / 3.0))

Definition at line 296 of file ncamera2.h.

float nCamera2::GetAspectRatio  )  const [inline]
 

get aspect ratio

Definition at line 308 of file ncamera2.h.

void nCamera2::SetNearPlane float  v  )  [inline]
 

set near clip plane

Definition at line 318 of file ncamera2.h.

float nCamera2::GetNearPlane  )  const [inline]
 

get near clip plane

Definition at line 330 of file ncamera2.h.

void nCamera2::SetFarPlane float  v  )  [inline]
 

set far clip plane

Definition at line 340 of file ncamera2.h.

float nCamera2::GetFarPlane  )  const [inline]
 

set far clip plane

Definition at line 352 of file ncamera2.h.

void nCamera2::SetShadowOffset float  v  )  [inline]
 

set shadow offset, used by shadow projection matrix to move clip planes

Definition at line 362 of file ncamera2.h.

float nCamera2::GetShadowOffset  )  const [inline]
 

get shadow offset, used by shadow projection matrix to move clip planes

Definition at line 373 of file ncamera2.h.

const matrix44 & nCamera2::GetProjection  )  [inline]
 

get a projection matrix representing the camera

Get the projection matrix representing the camera. This will only recompute the matrix if it is marked as dirty. The returned matrixed is identical to the result of D3DXMatrixPerspectiveFovRH() (see DX9 docs for details).

Definition at line 435 of file ncamera2.h.

const matrix44 & nCamera2::GetInvProjection  )  [inline]
 

get the inverse of the projection

Get the inverse of the projection matrix.

Definition at line 450 of file ncamera2.h.

const matrix44 & nCamera2::GetShadowProjection  )  [inline]
 

get the shadow projection matrix

Get the shadow projection matrix.

Definition at line 465 of file ncamera2.h.

const bbox3 & nCamera2::GetBox  )  [inline]
 

get a bounding box enclosing the camera

Get the bounding box enclosing the view frustum defined by the camera.

Definition at line 523 of file ncamera2.h.

void nCamera2::GetViewVolume float &  minx,
float &  maxx,
float &  miny,
float &  maxy,
float &  minz,
float &  maxz
const [inline]
 

Get the view volume.

Parameters:
minx the left x coord where view volume cuts near plane
maxx the right x coord where view volume cuts near plane
miny the upper y coord where view volume cuts near plane
maxy the lower y coord where view volume cuts near plane
minz distance from eye to near plane of view volume
maxz distance from eye to far plane of view volume

Definition at line 391 of file ncamera2.h.

nCamera2::ClipStatus nCamera2::GetClipStatus const matrix44 myTransform,
const matrix44 otherViewProjection
[inline]
 

check if 2 view volumes intersect

Check if 2 view volumes intersect.

Definition at line 480 of file ncamera2.h.


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

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.