Do not add triangles that cannot realize the distance to the priority queue

This commit is contained in:
Mael Rouxel-Labbé 2022-03-31 12:49:31 +02:00
parent bd29b976f5
commit f46d4d1fae
1 changed files with 3 additions and 2 deletions

View File

@ -1712,8 +1712,9 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1,
// which can go down, so it is only recomputed once splitting is finished,
// using the top value of the PQ
// Add the subtriangle to the candidate list.
candidate_triangles.emplace(sub_triangles[i], sub_triangle_bounds, triangle_and_bounds.tm1_face);
// Add the subtriangle to the candidate list if it is meaningful
if(sub_triangle_bounds.upper >= global_bounds.lower)
candidate_triangles.emplace(sub_triangles[i], sub_triangle_bounds, triangle_and_bounds.tm1_face);
}
// Update global upper Hausdorff bound after subdivision.