Skip to content

Commit

Permalink
Begin outlining streamlined nearest neighbour implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jul 19, 2020
1 parent ac78eff commit bdf59a1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -575,6 +575,37 @@ class Octree {
return largest_radius_squared_found;
}


// TODO: There has to be a better way than using structs like these!
struct Point_with_distance {
Point point;
FT distance;
};
struct Node_index_with_distance {
typename Node::Index index;
FT distance;
};

void _nearest_k_neighbours_recursive(Sphere &search_bounds, const Node &node,
std::vector<Point_with_distance> &results) {

// Check whether the node has children
if (node.is_leaf()) {

// Base case: the node has no children

// Check whether the node contains points
// TODO: This may be avoidable!
if (!node.is_empty()) {

}
}
else {

// Recursive case: the node has children
}
}

}; // end class Octree

} // namespace Octree
Expand Down

0 comments on commit bdf59a1

Please sign in to comment.