The frustum is a six-side geometry, usually use the frustum to do fast-culling: check a entity whether is a potential visible entity. More...
Public Member Functions | |
Frustum () | |
Constructor. | |
~Frustum () | |
Destructor. | |
bool | initFrustum (const Camera *camera) |
Init frustum from camera. More... | |
bool | isOutOfFrustum (const AABB &aabb) const |
Check an AABB whether out of frustum or not. More... | |
bool | isOutOfFrustum (const OBB &obb) const |
Check is an OBB whether out of frustum or not. More... | |
void | setClipZ (bool clipZ) |
Set z clip. More... | |
bool | isClipZ () |
Get Z clip. More... | |
The frustum is a six-side geometry, usually use the frustum to do fast-culling: check a entity whether is a potential visible entity.
bool initFrustum | ( | const Camera * | camera | ) |
Init frustum from camera.
The specified camera. Return true if success, otherwise return false.
bool isOutOfFrustum | ( | const AABB & | aabb | ) | const |
bool isOutOfFrustum | ( | const OBB & | obb | ) | const |
|
inline |
Set z clip.
If clipz == true use the near and far plane.
|
inline |
Get Z clip.
Return true if use the near and far plane, otherwise return false.