SceneCullingVolume
Engine/source/scene/culling/sceneCullingVolume.h
A volume used to include or exclude space in a scene.
Sorting
Before testing, culling volumes will be sorted by decreasing probability of causing test positives.
Thus, the sort point of a volume should be a rough metric of the amount of scene/screen space it covers.
Note that sort points for occluders are independent of sort points for includers.
Return the sort point value of the volume.
setSortPoint(F32 value)
Testing
Public Types
Type { Includer Occluder }
Type of culling.
Protected Attributes
The set of clipping planes that defines the clipping volume for this culler.
Protected Functions
bool
_testBounds(const B & bounds)
Test the given bounds against this culling volume.
Public Functions
Create an uninitialized culling volume.
SceneCullingVolume(Type type, const PlaneSetF & planes)
bool
Return true if this is an inclusion volume.
bool
Return true if this is an occlusion volume.
Detailed Description
A volume used to include or exclude space in a scene.
Culling volumes are represented as sets of clipping planes.
note:Culling is performed in world space so the plane data for culling volumes must be in world space too.
Sorting
Before testing, culling volumes will be sorted by decreasing probability of causing test positives.
Thus, the sort point of a volume should be a rough metric of the amount of scene/screen space it covers.
Note that sort points for occluders are independent of sort points for includers.
getSortPoint()
Return the sort point value of the volume.
The larger the value, the more likely the volume is to cause positive test results with bounding volumes.
setSortPoint(F32 value)
Testing
test(const Box3F & aabb)
Return true if the volume accepts the given AABB.
test(const OrientedBox3F & obb)
Return true if the volume accepts the given OBB.
test(const SphereF & sphere)
Return true if the volume accepts the given sphere.
Public Types
Type
Enumerator
- Includer
- Occluder
Type of culling.
Protected Attributes
PlaneSetF mClippingPlanes
The set of clipping planes that defines the clipping volume for this culler.
F32 mSortPoint
Type mType
What type of culling volume this is.
Protected Functions
_testBounds(const B & bounds)
Test the given bounds against this culling volume.
Note that we allow false positives here for includers. This will only cause an occasional object to be classified as intersecting when in fact it is outside. This is still better though than requiring the expensive intersection tests for all intersecting objects.
True if the culling volume accepts the given bounds.
Public Functions
SceneCullingVolume()
Create an uninitialized culling volume.
SceneCullingVolume(Type type, const PlaneSetF & planes)
getPlanes()
Return the set of clipping planes that defines the culling volume.
getType()
Return the type of volume defined by this culling volume, i.e.
whether it includes or excludes space.
isIncluder()
Return true if this is an inclusion volume.
isOccluder()
Return true if this is an occlusion volume.