a general view frustum class.
More...
#include <ShapeFrustum.h>
|
static bool | SweptSpherePlaneIntersect (float &t0, float &t1, const Plane *plane, const CShapeSphere *sphere, const Vector3 *sweepDir) |
| this function tests if the projection of a bounding sphere along the light direction intersects the view frustum
|
|
a general view frustum class.
§ CullPointWithPlane()
bool ParaEngine::CShapeFrustum::CullPointWithPlane |
( |
int |
iPlane, |
|
|
const Vector3 * |
vPos |
|
) |
| |
whether the point is inside a given plane.
- Parameters
-
iPlane | 0 is near plane, 1 is far plane, 2-5 is left, right, top, bottom. |
§ GetPlane()
Plane& ParaEngine::CShapeFrustum::GetPlane |
( |
int |
nIndex | ) |
|
|
inline |
Get a given frustum plane.
- Parameters
-
nIndex | 0 is near plane, 1 is far plane, 2-5 is left, right, top, bottom. |
§ TestBox()
int CShapeFrustum::TestBox |
( |
const CShapeAABB * |
box | ) |
const |
Tests if an AABB is inside/intersecting the view frustum.
- Returns
- : 2 requires more testing(meaning either intersecting) 1 is fast accept(meaning the box is fully inside the frustum) 0 is fast reject,
§ UpdateFrustum()
void CShapeFrustum::UpdateFrustum |
( |
const Matrix4 * |
matViewProj, |
|
|
bool |
bInversedMatrix = false , |
|
|
float |
fNearPlane = 0.f , |
|
|
float |
fFarPlane = 1.f |
|
) |
| |
|
virtual |
build a frustum from a camera (projection, or viewProjection) matrix
- Parameters
-
matViewProj | the view projection matrix. |
bInversedMatrix | if this is true, matViewProj is the inverse of standard matViewProj |
fNearPlane | the near plane in viewProjection coordinate, default to 0.f |
fFarPlane | the far plane in viewProjection coordinate, default to 1.f |
Reimplemented in ParaEngine::CCameraFrustum.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/math/ShapeFrustum.h
- Client/trunk/ParaEngineClient/math/ShapeFrustum.cpp