Public Member Functions | |
KDTreeSearch (KDTREE *tree, float *query_point, int k_closest) | |
~KDTreeSearch () | |
void | Search (int *result_count, float *distances, void **results) |
Private Member Functions | |
void | SearchRec (int Level, KDNODE *SubTree) |
bool | BoxIntersectsSearch (float *lower, float *upper) |
Private Attributes | |
KDTREE * | tree_ |
float * | query_point_ |
float * | sb_min_ |
float * | sb_max_ |
MinK< float, void * > | results_ |
Helper class for searching for the k closest points to query_point in tree.
KDTreeSearch::KDTreeSearch | ( | KDTREE * | tree, |
float * | query_point, | ||
int | k_closest | ||
) |
KDTreeSearch::~KDTreeSearch | ( | ) |
|
private |
Return whether the query region (the smallest known circle about query_point_ containing results->k_ points) intersects the box specified between lower and upper. For circular dimensions, we also check the point one wrap distance away from the query.
void KDTreeSearch::Search | ( | int * | result_count, |
float * | distances, | ||
void ** | results | ||
) |
Return the k nearest points' data.
Locate the k_closest points to query_point_, and return their distances and data into the given buffers.
|
private |
Recursively accumulate the k_closest points to query_point_ into results_.
Level | level in tree of sub-tree to be searched |
SubTree | sub-tree to be searched |
|
private |
|
private |
|
private |
|
private |
|
private |