FrustrumCuller Class Reference#include <frustrumCuller.h>
List of all members.
Detailed Description
Helper class to perform efficient frustrum culling on bounding boxes.
|
Public Types |
| MaxClipPlanes = 5 |
| We need to store at least 4 clip planes (sides of view frustrum).
|
| ClipPlaneMask = BIT(MaxClipPlanes) - 1 |
| FarSphereMask = BIT(MaxClipPlanes + 1) |
| FogPlaneBoxMask = BIT(MaxClipPlanes + 2) |
| AllClipPlanes = ClipPlaneMask | FarSphereMask |
enum | {
MaxClipPlanes = 5,
ClipPlaneMask = BIT(MaxClipPlanes) - 1,
FarSphereMask = BIT(MaxClipPlanes + 1),
FogPlaneBoxMask = BIT(MaxClipPlanes + 2),
AllClipPlanes = ClipPlaneMask | FarSphereMask
} |
Public Member Functions |
| FrustrumCuller () |
void | init (SceneState *state) |
const S32 | testBoxVisibility (const Box3F &bounds, const S32 mask, const F32 expand) const |
const F32 | getBoxDistance (const Box3F &box) const |
void | computeFrustumPlanes (const F64 frustumParameters[6], const MatrixF &worldSpaceToObjectSpace, const Point3F &wsCamPoint, PlaneF &outFarPlane, PlaneF &outXMinPlane, PlaneF &outXMaxPlane, PlaneF &outYMinPlane, PlaneF &outYMaxPlane) |
Public Attributes |
SceneState * | mSceneState |
Point3F | mCamPos |
F32 | mFarDistance |
U32 | mNumClipPlanes |
PlaneF | mClipPlane [MaxClipPlanes] |
Member Enumeration Documentation
- Enumerator:
-
MaxClipPlanes |
We need to store at least 4 clip planes (sides of view frustrum). |
ClipPlaneMask |
|
FarSphereMask |
|
FogPlaneBoxMask |
|
AllClipPlanes |
|
Constructor & Destructor Documentation
FrustrumCuller::FrustrumCuller |
( |
|
) |
[inline] |
Member Function Documentation
const S32 FrustrumCuller::testBoxVisibility |
( |
const Box3F & |
bounds, |
|
|
const S32 |
mask, |
|
|
const F32 |
expand | |
|
) |
| | const |
const F32 FrustrumCuller::getBoxDistance |
( |
const Box3F & |
box |
) |
const |
void FrustrumCuller::computeFrustumPlanes |
( |
const F64 |
frustumParameters[6], |
|
|
const MatrixF & |
worldSpaceToObjectSpace, |
|
|
const Point3F & |
wsCamPoint, |
|
|
PlaneF & |
outFarPlane, |
|
|
PlaneF & |
outXMinPlane, |
|
|
PlaneF & |
outXMaxPlane, |
|
|
PlaneF & |
outYMinPlane, |
|
|
PlaneF & |
outYMaxPlane | |
|
) |
| | |
Member Data Documentation
|