AI_SDB_Camera Class Reference
[Spatial Database]
#include <AI_SDB_Camera.h>
Detailed Description
Hold camera attributes.Technically this sets the projection matrix which is used by spatial databse frustum visitor.
- Version:
- 2.0 AI_SDB_Camera was ripped from The Nebula Device and renamed to AI_SDB_Camera. Now it is possible to use the class inside and outside Nebula projects.
Public Types | |
enum | ClipStatus { Outside, Inside, Clipped } |
clip status More... | |
enum | Type { Perspective, Orthogonal } |
type More... | |
Public Member Functions | |
AI_SDB_Camera () | |
default constructor | |
AI_SDB_Camera (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 | 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 AI_Plane | |
float | GetNearPlane () const |
get near clip AI_Plane | |
void | SetFarPlane (float v) |
set far clip AI_Plane | |
float | GetFarPlane () const |
set far clip AI_Plane | |
const AI_Matrix44 & | GetProjection () |
get a projection matrix representing the camera | |
const AI_Matrix44 & | GetInvProjection () |
get the inverse of the projection | |
const AI_BBox & | GetBox () |
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 AI_Matrix44 &myTransform, const AI_Matrix44 &otherViewProjection) |
check if 2 view volumes intersect |
Member Enumeration Documentation
enum AI_SDB_Camera::Type |
Constructor & Destructor Documentation
AI_SDB_Camera::AI_SDB_Camera | ( | ) | [inline] |
default constructor
AI_SDB_Camera::AI_SDB_Camera | ( | float | aov, | |
float | aspect, | |||
float | nearp, | |||
float | farp | |||
) | [inline] |
arg constructor
Member Function Documentation
void AI_SDB_Camera::SetPerspective | ( | float | aov, | |
float | aspect, | |||
float | nearp, | |||
float | farp | |||
) | [inline] |
set perspective projection parameters
void AI_SDB_Camera::SetOrthogonal | ( | float | w, | |
float | h, | |||
float | nearp, | |||
float | farp | |||
) | [inline] |
set orthogonal projection parameters
void AI_SDB_Camera::SetType | ( | Type | t | ) | [inline] |
set projection type
AI_SDB_Camera::Type AI_SDB_Camera::GetType | ( | ) | const [inline] |
get projection type
void AI_SDB_Camera::SetWidth | ( | float | w | ) | [inline] |
set view volume width (ortho only)
float AI_SDB_Camera::GetWidth | ( | ) | const [inline] |
get view volume width (ortho only)
void AI_SDB_Camera::SetHeight | ( | float | h | ) | [inline] |
set view volume height (ortho only)
float AI_SDB_Camera::GetHeight | ( | ) | const [inline] |
get view volume height (ortho only)
void AI_SDB_Camera::SetAngleOfView | ( | float | a | ) | [inline] |
set angle of view in degree
float AI_SDB_Camera::GetAngleOfView | ( | ) | const [inline] |
get angle of view
void AI_SDB_Camera::SetAspectRatio | ( | float | r | ) | [inline] |
set horizontal/vertical aspect ratio (i.e. (4.0 / 3.0))
float AI_SDB_Camera::GetAspectRatio | ( | ) | const [inline] |
get aspect ratio
void AI_SDB_Camera::SetNearPlane | ( | float | v | ) | [inline] |
set near clip AI_Plane
float AI_SDB_Camera::GetNearPlane | ( | ) | const [inline] |
get near clip AI_Plane
void AI_SDB_Camera::SetFarPlane | ( | float | v | ) | [inline] |
set far clip AI_Plane
float AI_SDB_Camera::GetFarPlane | ( | ) | const [inline] |
set far clip AI_Plane
const AI_Matrix44 & AI_SDB_Camera::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).
const AI_Matrix44 & AI_SDB_Camera::GetInvProjection | ( | ) | [inline] |
get the inverse of the projection
Get the inverse of the projection matrix.
const AI_BBox & AI_SDB_Camera::GetBox | ( | ) | [inline] |
get a bounding box enclosing the camera
Get the bounding box enclosing the view frustum defined by the camera.
void AI_SDB_Camera::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 AI_Plane maxx the right x coord where view volume cuts near AI_Plane miny the upper y coord where view volume cuts near AI_Plane maxy the lower y coord where view volume cuts near AI_Plane minz distance from eye to near AI_Plane of view volume maxz distance from eye to far AI_Plane of view volume
AI_SDB_Camera::ClipStatus AI_SDB_Camera::GetClipStatus | ( | const AI_Matrix44 & | myTransform, | |
const AI_Matrix44 & | otherViewProjection | |||
) | [inline] |
check if 2 view volumes intersect
Check if 2 view volumes intersect.
The documentation for this class was generated from the following file: