|
GL Studio API
|
#include <cull.h>
Public Types | |
| enum | CullResultEnum { , INTERSECTS_FRUSTUM, INSIDE_FRUSTUM } |
| enum | ClippingPlanesEnum |
Public Member Functions | |
| Culler (bool enabled=true) | |
| void | ExtractFrustum (OpenGLMatrices &matrices) |
| CullResultEnum | SphereInFrustum (const Vector &v, const float radius) const |
| bool | SphereOutsideFrustum (const Vector ¢er, const float radius) const |
| bool | Enabled (void) const |
| void | Enabled (bool newVal) |
| const PlaneClass & | Plane (const ClippingPlanesEnum &whichPlane) const |
Protected Attributes | |
| PlaneClass | _planes [6] |
The Culler class. Implements view frustum culling.
| enum ClippingPlanesEnum |
Definitions for the six frustum clipping planes
| enum CullResultEnum |
| Culler | ( | bool | enabled = true | ) |
Array of six clipping planes to define the frustum Culler constructor
| enabled | Whether or not to actually to the culling test |
|
inline |
Accessor method to get whether or not culling is enabled
|
inline |
Accessor method to set whether or not culling is enabled Be carefull with this, because the Culler is usually passed by reference.
| void ExtractFrustum | ( | OpenGLMatrices & | matrices | ) |
Reads the current OpenGL projection matrices and determines the six frustum planes Note: This assumes a perspective projection, but it will work with orthographic, though it could be optimized better if it was known that Ortho is being used.
| const PlaneClass& Plane | ( | const ClippingPlanesEnum & | whichPlane | ) | const |
| CullResultEnum SphereInFrustum | ( | const Vector & | v, |
| const float | radius | ||
| ) | const |
|
inline |
Slightly faster sphere culling because it doesn't test seperately for intersection and it ignores the Enabled() state.
|
protected |
Whether or not culling is enabled
1.8.10