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. More...
template<class Concurrency_tag , class TriangleMesh , class NamedParameters1 , class NamedParameters2 >
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.
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.
If true is passed, points are generated in a random and uniform way on the surface of tm, and/or on edges of tm.
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.
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