Search for all points within given range. Start at the root. If the current node is within the range, add it to the result. Recursively search the left and/or right subtrees if the range intersects their respective spaces. Prune the search if the current node’s space does not intersect the query range.
665 {
666 std::vector<kd_tree<K>::item> rangePoints;
668 return rangePoints;
669 }
Node * m_Root
Pointer to the root node of the tree.
void range_search_recursive(Node *node, const item &point, const item &condition, std::vector< item > &rangePoints, int depth) const
Recursive function to search for all nearest points in the kd_tree.