mirror of https://github.com/CGAL/cgal
added named param for choosing between one sided and symmetric dist in the is_larger_HD function
This commit is contained in:
parent
7f19456fa2
commit
73581e15ad
|
|
@ -123,6 +123,7 @@ CGAL_add_named_parameter(non_manifold_feature_map_t, non_manifold_feature_map, n
|
|||
CGAL_add_named_parameter(polyhedral_envelope_epsilon_t, polyhedral_envelope_epsilon, polyhedral_envelope_epsilon)
|
||||
CGAL_add_named_parameter(match_faces_t, match_faces, match_faces)
|
||||
CGAL_add_named_parameter(face_epsilon_map_t, face_epsilon_map, face_epsilon_map)
|
||||
CGAL_add_named_parameter(use_one_sided_hausdorff_t, use_one_sided_hausdorff, use_one_sided_hausdorff)
|
||||
|
||||
// List of named parameters that we use in the package 'Surface Mesh Simplification'
|
||||
CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost)
|
||||
|
|
|
|||
|
|
@ -2530,7 +2530,16 @@ double bounded_error_symmetric_Hausdorff_distance(
|
|||
*
|
||||
* Instead of computing the full distance and checking it against the user-provided
|
||||
* value, this function early quits in case certain criteria show that the meshes
|
||||
* do not satisfy the provided distance bound.
|
||||
* do not satisfy the provided `distance_bound`.
|
||||
*
|
||||
* \cgalNamedParamsBegin
|
||||
* \cgalParamNBegin{use_one_sided_hausdorff}
|
||||
* \cgalParamDescription{a boolean tag indicating if the one-sided Hausdorff distance should be used.}
|
||||
* \cgalParamType{Boolean}
|
||||
* \cgalParamDefault{`true`}
|
||||
* \cgalParamExtra{If this tag is set to `false`, the symmetric Hausdorff distance is used.}
|
||||
* \cgalParamNEnd
|
||||
* \cgalNamedParamsEnd
|
||||
*
|
||||
* @return Boolean `true` or `false`
|
||||
*/
|
||||
|
|
@ -2568,7 +2577,8 @@ bool is_Hausdorff_distance_larger(
|
|||
parameters::get_parameter(np2, internal_np::match_faces), true);
|
||||
const bool match_faces = match_faces1 && match_faces2;
|
||||
|
||||
const bool use_one_sided = true; // TODO: Put in the NP!
|
||||
const bool use_one_sided = parameters::choose_parameter(
|
||||
parameters::get_parameter(np1, internal_np::use_one_sided_hausdorff), true);
|
||||
CGAL_precondition(error_bound >= 0.0);
|
||||
const FT error_threshold = static_cast<FT>(error_bound);
|
||||
CGAL_precondition(distance_bound >= 0.0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue