T
- boundable classpublic static class BVFeatureQuery.NearestKCollector<T> extends java.lang.Object implements BVFeatureQuery.ObjectDistanceCollector
Constructor and Description |
---|
NearestKCollector(int k) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Boundable object,
double distance) |
boolean |
check(maspack.geometry.BVFeatureQuery.BVCheckRequest bvcr)
Checks if a request has the potential to satisfy the condition,
otherwise we can stop the search.
|
java.util.TreeSet<BVFeatureQuery.ObjectDistanceEntry<T>> |
nearest()
Retrieves the current set of nearest entries
Note: could be
< k if there are fewer than k bounded elements,
and > k if the last several elements have the exact same distance |
public boolean check(maspack.geometry.BVFeatureQuery.BVCheckRequest bvcr)
BVFeatureQuery.ObjectDistanceCollector
check
in interface BVFeatureQuery.ObjectDistanceCollector
bvcr
- request, containg BVNode and distancepublic boolean add(Boundable object, double distance)
add
in interface BVFeatureQuery.ObjectDistanceCollector
public java.util.TreeSet<BVFeatureQuery.ObjectDistanceEntry<T>> nearest()
<
k if there are fewer than k bounded elements,
and >
k if the last several elements have the exact same distance