returns the distance to tm of the point from points that is the furthest from tm.
template<class Concurrency_tag , class TriangleMesh , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
computes the approximate Hausdorff distance from tm1 to tm2 by returning the distance of the farthest point from tm2 amongst a sampling of tm1 generated with the function sample_triangle_mesh() with tm1 and np1 as parameter.
template<class Concurrency_tag , class TriangleMesh , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
returns the approximate symmetric Hausdorff distance between tm1 and tm2, that is the maximum of approximate_Hausdorff_distance(tm1, tm2, np1, np2) and approximate_Hausdorff_distance(tm2, tm1, np2, np1).
template<class TriangleMesh , class PointRange , class NamedParameters = parameters::Default_named_parameters>
returns an approximation of the distance between points and the point lying on tm that is the farthest from points.
template<class Concurrency_tag , class TriangleMesh1 , class TriangleMesh2 , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
returns an estimate on the Hausdorff distance between tm1 and tm2 that is at most error_bound away from the actual Hausdorff distance between the two given meshes.
template<class Concurrency_tag , class TriangleMesh1 , class TriangleMesh2 , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
returns the the symmetric Hausdorff distance, that is the maximum of bounded_error_Hausdorff_distance(tm1, tm2, error_bound, np1, np2) and bounded_error_Hausdorff_distance(tm2, tm1, error_bound, np2, np1).
template<class Concurrency_tag , class TriangleMesh1 , class TriangleMesh2 , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
template<class Concurrency_tag , class TriangleMesh , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
computes the approximate Hausdorff distance from tm1 to tm2 by returning the distance of the farthest point from tm2 amongst a sampling of tm1 generated with the function sample_triangle_mesh() with tm1 and np1 as parameter.
A parallel version is provided and requires the executable to be linked against the Intel TBB library. To control the number of threads used, the user may use the tbb::task_scheduler_init class. See the TBB documentation for more details.
for each triangle of tm, the distance of its farthest point from points is bounded. A triangle is subdivided into sub-triangles so that the difference of its distance bounds is smaller than precision. precision must be strictly positive to avoid infinite loops.
np
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating points to the vertices of tm
Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, tm)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMesh.
template<class Concurrency_tag , class TriangleMesh , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
returns the approximate symmetric Hausdorff distance between tm1 and tm2, that is the maximum of approximate_Hausdorff_distance(tm1, tm2, np1, np2) and approximate_Hausdorff_distance(tm2, tm1, np2, np1).
template<class Concurrency_tag , class TriangleMesh1 , class TriangleMesh2 , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
returns an estimate on the Hausdorff distance between tm1 and tm2 that is at most error_bound away from the actual Hausdorff distance between the two given meshes.
Template Parameters
Concurrency_tag
enables sequential versus parallel algorithm. Possible values are Sequential_tag and Parallel_tag. Currently, the parallel version is not implemented and the sequential version is always used whatever tag is chosen!
a maximum bound by which the Hausdorff distance estimate is allowed to deviate from the actual Hausdorff distance.
np1
an optional sequence of Named Parameters among the ones listed below
np2
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating points to the vertices of tmX
Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMeshX>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, tmX)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMeshX.
a boolean tag that turns on the preprocessing step that filters out all faces which belong to both meshes and hence do not contribute to the final distance
Type: Boolean
Default: true
Extra: Both np1 and np2 must have this tag set to true in order to activate this preprocessing.
template<class Concurrency_tag , class TriangleMesh1 , class TriangleMesh2 , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
returns the the symmetric Hausdorff distance, that is the maximum of bounded_error_Hausdorff_distance(tm1, tm2, error_bound, np1, np2) and bounded_error_Hausdorff_distance(tm2, tm1, error_bound, np2, np1).
This function optimizes all internal calls to shared data structures in order to speed up the computation.
template<class Concurrency_tag , class TriangleMesh1 , class TriangleMesh2 , class NamedParameters1 = parameters::Default_named_parameters, class NamedParameters2 = parameters::Default_named_parameters>
returns true if the Hausdorff distance between two meshes is larger than the user-defined max distance, otherwise it returns false.
The distance used to compute the proximity of the meshes is the bounded-error Hausdorff distance. Instead of computing the full distance and checking it against the user-provided value, this function returns early if certain criteria show that the meshes do not satisfy the provided distance_bound.
a model of OutputIterator holding objects of the same point type as the value type of the point type associated to the mesh tm, i.e. the value type of the vertex point map property map, if provided, or the value type of the internal point property map otherwise
Extra: The geometric traits class must be compatible with the vertex point type.
a value to seed the random number generator
Type: unsigned int
Default: a value generated with std::time()
If true is passed, points are generated uniformly at random on faces and/or edges of tm. If do_sample_faces is true, random points will be iteratively generated uniformly at random in the triangle of a face selected with probability proportional to its area. If do_sample_edges is true, random points will be iteratively generated uniformly at random in the segment of an edge selected with probability proportional to its length.
Type: Boolean
Type: true
Extra: For faces, the number of sample points is the value passed to the named parameter number_of_points_on_faces. If not set, the value passed to the named parameter number_of_points_per_area_unit is multiplied by the area of tm to get the number of sample points. If none of these parameters is set, the number of points sampled is num_vertices(tm). For edges, the number of the number of sample points is the value passed to the named parameter number_of_points_on_edges. If not set, the value passed to the named parameter number_of_points_per_distance_unit is multiplied by the sum of the length of edges of tm to get the number of sample points. If none of these parameters is set, the number of points sampled is num_vertices(tm).
If true is passed, points are generated on a grid in each triangle, with a minimum of one point per triangle.
Type: Boolean
Default: false
Extra: The distance between two consecutive points in the grid is that of the length of the smallest non-null edge of tm or the value passed to the named parameter grid_spacing. Edges are also split using the same distance, if requested.
if true is passed, points are generated randomly in each triangle and/or on each edge.
Type: Boolean
Default: false
Extra: For faces, the number of points per triangle is the value passed to the named parameter number_of_points_per_face. If not set, the value passed to the named parameter number_of_points_per_area_unit is used to pick a number of points per face proportional to the triangle area with a minimum of one point per face. If none of these parameters is set, 2 divided by the square of the length of the smallest non-null edge of tm is used as if it was passed to number_of_points_per_area_unit. For edges, the number of points per edge is the value passed to the named parameter number_of_points_per_edge. If not set, the value passed to the named parameter number_of_points_per_distance_unit is used to pick a number of points per edge proportional to the length of the edge with a minimum of one point per face. If none of these parameters is set, 1 divided by the length of the smallest non-null edge of tm is used as if it was passed to number_of_points_per_distance_unit.
If true is passed, the vertices of tm are part of the sample.
Type: Boolean
Default: true
If true is passed, edges of tm are sampled.
Type: Boolean
Default: true
If true is passed, faces of tm are sampled.
Type: Boolean
Default: true
a value used as the grid spacing for the grid sampling method
Type: double
Default: the length of the shortest, non-degenerate edge of tm
a value used for the random sampling method as the number of points to pick exclusively on edges
Type: unsigned int
Default: num_vertices(tm) or a value based on nb_points_per_distance_unit, if it is defined
a value used for the random sampling method as the number of points to pick on the surface
Type: unsigned int
Default: num_vertices(tm) or a value based on nb_points_per_area_unit, if it is defined
a value used for the random sampling and the Monte Carlo sampling methods to respectively determine the total number of points on edges and the number of points per edge
Type: double
Default: 1 divided by the length of the shortest, non-degenerate edge of tm
a value used by the Monte-Carlo sampling method as the number of points per edge to pick
Type: unsigned int
Default: 0
a value used for the random sampling and the Monte Carlo sampling methods to respectively determine the total number of points inside faces and the number of points per face
Type: double
Default: 2 divided by the squared length of the shortest, non-degenerate edge of tm
a value used by the Monte-Carlo sampling method as the number of points per face to pick
Extra: The geometric traits class must be compatible with the point range's point type.
a value to seed the random number generator
Type: unsigned int
Default: a value generated with std::time()
If true is passed, points are generated in a random and uniform way over the triangles of the soup.
Type: Boolean
Type: true
Extra: The number of sample points is the value passed to the named parameter number_of_points_on_faces. If not set, the value passed to the named parameter number_of_points_per_area_unit is multiplied by the area of the soup to get the number of sample points. If none of these parameters is set, the number of points sampled is points.size().
If true is passed, points are generated on a grid in each triangle, with a minimum of one point per triangle.
Type: Boolean
Default: false
Extra: The distance between two consecutive points in the grid is that of the length of the smallest non-null edge of the soup or the value passed to the named parameter grid_spacing.
if true is passed, points are generated randomly in each triangle.
Type: Boolean
Default: false
Extra: The number of points per triangle is the value passed to the named parameter number_of_points_per_face. If not set, the value passed to the named parameter number_of_points_per_area_unit is used to pick a number of points per face proportional to the triangle area with a minimum of one point per face. If none of these parameters is set, the number of points per area unit is set to 2 divided by the square of the length of the smallest non-null edge of the soup.
If true is passed, the points of points are part of the sample.
Type: Boolean
Default: true
If true is passed, faces of the soup are sampled.
Type: Boolean
Default: true
a value used as the grid spacing for the grid sampling method
Type: double
Default: the length of the shortest, non-degenerate edge of the soup
a value used for the random sampling method as the number of points to pick on the surface
Type: unsigned int
Default: points.size() or a value based on nb_points_per_area_unit, if it is defined
a value used by the Monte-Carlo sampling method as the number of points per face to pick
Type: unsigned int
Default: 0
a value used for the random sampling and the Monte Carlo sampling methods to respectively determine the total number of points inside faces and the number of points per face
Type: double
Default: 2 divided by the squared length of the shortest, non-degenerate edge of the soup