Click or drag to resize
DigitalRuneISupportFrustumCullingT Interface

Namespace: DigitalRune.Geometry.Partitioning
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public interface ISupportFrustumCulling<T>

Type Parameters

T
The type of the queried items.

The ISupportFrustumCullingT type exposes the following members.

Methods
  NameDescription
Public methodGetOverlaps
Gets the items that touch the bounding volume ("k-DOP") defined by a set of planes.
Top
Remarks

It is recommended to use a type of ISpatialPartitionT that implements this interface in the BroadPhase of a collision domain, if the collision domain is used for frustum culling.

In general frustum culling can be done by adding a collision object for the viewing frustum (usually a ViewVolume shape) to a collision domain. The objects inside the viewing frustum can then be queried by calling GetContactObjects(CollisionObject). This approach is acceptable for small scenes, but it does not perform well in large, complex scenes.

A viewing frustum of a camera has certain characteristics that reduce performance of a collision domain: The viewing frustum is usually extremely large and can cover entire scenes. The camera usually moves every frame. Therefore, when the object is added to a collision domain a large number of contact sets is created and updated every frame.

Luckily frustum culling does not need to be exact: In most cases it is sufficient to only check the axis-aligned bounding boxes (AABBs) of the scene objects against the viewing frustum. This can be done manually by calling GetOverlaps(IListPlane) against the BroadPhase of a collision domain and skip the narrow phase of the collision detection. In this case the viewing frustum does not need to be added to the collision domain!

See Also