ISupportClosestPointQueriesT Interface |
Namespace: DigitalRune.Geometry.Partitioning
Name | Description | |
---|---|---|
GetClosestPointCandidates(Aabb, Single, FuncT, Single) |
Gets all items that are candidates for the smallest closest-point distance to a given
axis-aligned bounding box (AABB).
| |
GetClosestPointCandidates(Vector3F, Pose, ISpatialPartitionT, Vector3F, Pose, FuncT, T, Single) |
Gets all items that are candidates for the smallest closest-point distance to items in a
given partition.
|
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.