diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index f9307b1e8c4..1e2d7ce0b0f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -882,7 +883,11 @@ double bounded_error_Hausdorff_impl( // Build traversal traits for tm1_tree Hausdorff_primitive_traits_tm1 traversal_traits_tm1( tm1_tree.traits(), tm2_tree, tm1, tm2, vpm1, vpm2, hint.first ); + // Find candidate triangles in TM1 which might realise the Hausdorff bound +// TODO Initialize the distances on all the vertices first and store those. +// TODO Do not traverse TM1, but only TM2, i.e. reduce to Culling on TM2 (Can do this for all triangles in TM1 in parallel) + tm1_tree.traversal_with_priority( Point_3(0,0,0), traversal_traits_tm1 ); // dummy point given as query as not needed // TODO Is there a better/faster data structure than the Heap used here? diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h index 2cdc3ae9793..9e03cb17942 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/AABB_traversal_traits_with_Hausdorff_distance.h @@ -91,6 +91,7 @@ namespace CGAL { void intersection(const Query& query, const Primitive& primitive) { /* Have reached a single triangle, process it */ + // TODO Already perform these computations once we have <=k /* / Determine the distance accroding to @@ -285,6 +286,7 @@ namespace CGAL { std::numeric_limits::infinity(), std::numeric_limits::infinity() ); + // TODO Pass on the current global bounds to the TM2 tree traversal. There, only enter subtrees that can still be better than the current global bound. m_tm2_tree.traversal_with_priority(candidate_triangle, traversal_traits_tm2); // Update global Hausdorff bounds according to the obtained local bounds