Click or drag to resize
DigitalRuneISupportClosestPointQueriesT Interface

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

Type Parameters

T
The type of the queried items.
Methods
Remarks

Given a collection of items, the goal is to find the item that is closest to a given item or volume. Without further information the closest-point on each item in the collection has to be computed, and the item with the smallest closest-point distance is the winner. Some ISpatialPartitionTs have an internal structure that can speed up the search.

The methods in this interface find the items that are good candidates to be closest to the given volume (axis-aligned bounding box or another partition). A callback method is called with each candidate item. The callback must compute the closest-point on the item and return the squared closest-point distance. The returned value helps the spatial partition to filter out bad candidates.

The callback method must return 0 if the candidate item is touching/penetrating the other item. -1 can be returned if the search for more candidates should be aborted. The callback can return positive infinity if it cannot compute a squared closest point distance.

See Also