\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.12.2 - Triangulated Surface Mesh Simplification
Named Parameters for Surface Mesh Simplification

In this package, some optional parameters are implemented as BGL optional named parameters (see Named Parameters for more information on how to use them).

The named parameters list is a composition of function calls separated by a dot ( \( .\)) where the name of each function matches the name of an argument and wraps the actual parameter. The sequence of named parameters should start with CGAL::parameters::.

This is an example with 2 arguments:

`CGAL::parameters::get_cost(the_actual_cost).halfedge_index_map(the_actual_halfedge_index_map)`

the_actual_cost and the_actual_halfedge_index_map are the actual parameters, while get_cost() and halfedge_index_map() are wrapper functions used to designate each formal argument.

All named parameters have default values so you only need to compose those for which the default is inappropriate. Furthermore, since each actual parameter is wrapped in a function whose name designates the formal argument, the order of named parameters in the list is totally irrelevant.

In the following, we assume that the type TriangleMesh is passed as template parameters of the functions, and is a model of the concept MutableFaceGraph.

The following named parameters, offered by the package CGAL and the Boost Graph Library (see BGL Named Parameters), are used in this package:

vertex_point_map

is the property map with the points associated to the vertices of the polygon mesh pmesh.
Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and GeomTraits::Point_3 as value type.
Default:

boost::get(CGAL::vertex_point, pmesh)

vertex_index_map

is the property map containing the index of each vertex of the input polygon mesh.
Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and the value type

typename boost::property_traits<typename boost::property_map<TriangleMesh, CGAL::vertex_index_t>::type>::value_type

Default:

boost::get(CGAL::vertex_index, pmesh)

halfedge_index_map

is the property map containing the index of each halfedge of the input polygon mesh.
Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::halfedge_descriptor as key type and the value type:

typename boost::property_traits<typename boost::property_map<TriangleMesh, CGAL::halfedge_index_t>::type>::value_type

Default: the property map obtained by calling get(CGAL::halfedge_index,surface_mesh), which requires the surface mesh edges to have an id() member properly initialized to the require value. If the edges don't have such an id(), a property map must be passed explicitly. An external property map can be easily obtained by calling get(CGAL::halfedge_external_index,surface_mesh). This constructs on the fly, and returns, a property map which non-intrusively associates a proper id with each edge.

edge_is_constrained_map is the property map containing information about edges of the input polygon mesh being marked or not.
Type: a class model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::edge_descriptor as key type and bool as value type. It should be default constructible.
Default: a default property map where no edge is constrained

In addition to these named parameters, this package offers the following named parameters:

get_cost

is the policy which returns the collapse cost for an edge.
Type: a model of the concept GetCost
Default: The cost policy CGAL::Surface_mesh_simplification::LindstromTurk_cost<EdgeCollapsableSurfaceMesh>

get_placement

is the policy which returns the placement (position of the replacemet vertex) for an edge.
Type: a model of the concept GetPlacement
Default: The cost policy CGAL::Surface_mesh_simplification::LindstromTurk_placement<EdgeCollapsableSurfaceMesh>

visitor is the visitor that is called by the edge_collapse() function in certain points to allow the user to track the simplification process.being marked or not. If you wish to provide your own visitor, you can derive from: CGAL::Surface_mesh_simplification::Edge_collapse_visitor_base<EdgeCollapsableSurfaceMesh> and override only the callbacks you are interested in.
Type: user specific
Default: an implementation-defined dummy visitor