* This routine searches the K-D tree specified by Tree and * finds the QuerySize nearest neighbors of Query. All neighbors * must be within MaxDistance of Query. The data contents of * the nearest neighbors * are placed in NBuffer and their distances from Query are * placed in DBuffer. * @param Tree ptr to K-D tree to be searched * @param Query ptr to query key (point in D-space) *
| 319 | * - 7/13/89, DSJ, Return contents of node instead of node itself. |
| 320 | */ |
| 321 | void KDNearestNeighborSearch( |
| 322 | KDTREE *Tree, FLOAT32 Query[], int QuerySize, FLOAT32 MaxDistance, |
| 323 | int *NumberOfResults, void **NBuffer, FLOAT32 DBuffer[]) { |
| 324 | KDTreeSearch search(Tree, Query, QuerySize); |
| 325 | search.Search(NumberOfResults, DBuffer, NBuffer); |
| 326 | } |
| 327 | |
| 328 | |
| 329 | /*---------------------------------------------------------------------------*/ |