#include <cull.h>
|
bool | _enabled |
| Whether or not culling is enabled.
|
|
PlaneClass | _planes [6] |
| Array of six clipping planes to define the frustum.
|
|
The Culler class. Implements view frustum culling.
◆ ClippingPlanesEnum
Definitions for the six frustum clipping planes
◆ CullResultEnum
Return type for culling function
Enumerator |
---|
INTERSECTS_FRUSTUM | The object was entirely outside of the viewing frustum
|
INSIDE_FRUSTUM | The object intersects the viewing frustum The object was entirely inside the viewing frustum
|
◆ Culler()
Culler constructor
- Parameters
-
enabled | Whether or not to actually to the culling test |
◆ Enabled() [1/2]
Accessor method to get whether or not culling is enabled
- Returns
- Whether or not culling is enabled
◆ Enabled() [2/2]
void Enabled |
( |
bool |
newVal | ) |
|
|
inline |
Accessor method to set whether or not culling is enabled. Be careful with this, because the Culler is usually passed by reference.
- Parameters
-
newVal | The enabled value to set. |
◆ ExtractFrustum()
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.
- Parameters
-
matrices | A return reference for the frustum. |
◆ Plane()
Returns the clip plane values for the desired plane index.
- Parameters
-
whichPlane | The index for the clipping plane to return. |
- Returns
- A reference to the desired clipping plane for this view frustum.
◆ SphereInFrustum()
- Parameters
-
v | The center of the sphere. |
radius | The radius of the sphere. |
- Returns
- Whether the sphere is inside, outside or intersects the view frustum.
◆ SphereOutsideFrustum()
bool SphereOutsideFrustum |
( |
const Vector & |
center, |
|
|
const float |
radius |
|
) |
| const |
|
inline |
Slightly faster sphere culling because it doesn't test seperately for intersection and it ignores the Enabled() state.
- Parameters
-
center | The center of the sphere. |
radius | The radius of the sphere. |
- Returns
- True if outside or intersecting, false if inside.
The documentation for this class was generated from the following file: