mirror of https://github.com/CGAL/cgal
update doc
This commit is contained in:
parent
66f6c52a7b
commit
a362d6d83a
|
|
@ -2,10 +2,10 @@
|
||||||
\ingroup PkgTSMAConcepts
|
\ingroup PkgTSMAConcepts
|
||||||
\cgalConcept
|
\cgalConcept
|
||||||
|
|
||||||
The concept `ErrorMetric` computes the fitting error of a face to a `Proxy`, used in CGAL::VSA::Mesh_approximation.
|
The concept `ErrorMetric` computes the fitting error of a face to a `Proxy`, used in CGAL::VSA_approximation.
|
||||||
|
|
||||||
\cgalHasModel `CGAL::VSA::L21_metric`
|
\cgalHasModel `CGAL::L21_metric`
|
||||||
\cgalHasModel `CGAL::VSA::L2_metric`
|
\cgalHasModel `CGAL::L2_metric`
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ErrorMetric {
|
class ErrorMetric {
|
||||||
|
|
@ -14,15 +14,20 @@ public:
|
||||||
typedef unspecified_type FT;
|
typedef unspecified_type FT;
|
||||||
/// Triangle mesh face descriptor.
|
/// Triangle mesh face descriptor.
|
||||||
typedef unspecified_type face_descriptor;
|
typedef unspecified_type face_descriptor;
|
||||||
/// Parametrized shape proxy.
|
/// Parameterized shape proxy.
|
||||||
typedef unspecified_type Proxy;
|
typedef unspecified_type Proxy;
|
||||||
|
|
||||||
/// @name Operations
|
/// @name Operations
|
||||||
/// A model of this concept must provide:
|
/// A model of this concept must provide:
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/// returns the fitting error of a face f to the proxy px.
|
/// returns the fitting error of a face f to the Proxy px.
|
||||||
FT operator()(const face_descriptor &f, const Proxy &px) const;
|
FT compute_error(const face_descriptor &f, const Proxy &px) const;
|
||||||
|
|
||||||
|
/// returns the fitted proxy from a range of facets.
|
||||||
|
template <typename FacetIterator>
|
||||||
|
Proxy fit_proxy(const FacetIterator &beg, const FacetIterator &end) const;
|
||||||
|
|
||||||
/// }
|
/// }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
/*!
|
|
||||||
\ingroup PkgTSMAConcepts
|
|
||||||
\cgalConcept
|
|
||||||
|
|
||||||
The concept `Proxy` describes the primitive shape, nested within the `ErrorMetric` and `ProxyFitting` concepts.
|
|
||||||
|
|
||||||
It can contain anything to store the primitive shape parameters.
|
|
||||||
|
|
||||||
\cgalHasModel `CGAL::VSA::Plane_proxy`
|
|
||||||
*/
|
|
||||||
|
|
||||||
class Proxy {
|
|
||||||
public:
|
|
||||||
/// @name Data members
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/// Anything to store the proxy shape parameters.
|
|
||||||
|
|
||||||
/// }
|
|
||||||
};
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
/*!
|
|
||||||
\ingroup PkgTSMAConcepts
|
|
||||||
\cgalConcept
|
|
||||||
|
|
||||||
The concept `ProxyFitting` fits a shape primitive `Proxy` from a range of facets, used in CGAL::VSA::Mesh_approximation.
|
|
||||||
|
|
||||||
\cgalHasModel `CGAL::VSA::L21_proxy_fitting`
|
|
||||||
\cgalHasModel `CGAL::VSA::L2_proxy_fitting`
|
|
||||||
*/
|
|
||||||
|
|
||||||
class ProxyFitting {
|
|
||||||
public:
|
|
||||||
/// Parametrized shape proxy.
|
|
||||||
typedef unspecified_type Proxy;
|
|
||||||
|
|
||||||
/// @name Operations
|
|
||||||
/// A model of this concept must provide:
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/// returns the fitted proxy from a range of facets.
|
|
||||||
template <typename FacetIterator>
|
|
||||||
Proxy operator()(const FacetIterator &beg, const FacetIterator &end) const;
|
|
||||||
|
|
||||||
/// }
|
|
||||||
};
|
|
||||||
|
|
@ -25,21 +25,19 @@ The sequence of named parameters should start with `CGAL::VSA::parameters::`.
|
||||||
See below a sample call of a function that uses the optional BGL named parameters.
|
See below a sample call of a function that uses the optional BGL named parameters.
|
||||||
|
|
||||||
\code
|
\code
|
||||||
// input: input triangle mesh to be approximated
|
// tm: input triangle mesh to be approximated
|
||||||
// output: output polyhedron mesh
|
|
||||||
// points: output anchor points
|
|
||||||
// triangles: output triplets of indexed triangles
|
|
||||||
// method: seed initialization method
|
// method: seed initialization method
|
||||||
// nb_proxies: number of proxies used to approximate the geometry
|
// nb_proxies: number of proxies used to approximate the geometry
|
||||||
// nb_iterations: number of iterations after initialization
|
// nb_iterations: number of iterations after initialization
|
||||||
|
// points: output anchor points
|
||||||
|
// triangles: output triplets of indexed triangles
|
||||||
|
|
||||||
CGAL::VSA::mesh_approximation(input,
|
CGAL::mesh_approximation(tm,
|
||||||
std::back_inserter(points),
|
|
||||||
std::back_inserter(triangles),
|
|
||||||
CGAL::VSA::parameters::seeding_method(method).
|
CGAL::VSA::parameters::seeding_method(method).
|
||||||
max_nb_proxies(nb_proxies).
|
max_nb_proxies(nb_proxies).
|
||||||
nb_of_iterations(nb_iterations).
|
nb_of_iterations(nb_iterations).
|
||||||
output_mesh(&output));
|
anchor_points(std::back_inserter(points)).
|
||||||
|
indexed_triangles(std::back_inserter(triangles)));
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\cgalHeading{List of Available Named Parameters}
|
\cgalHeading{List of Available Named Parameters}
|
||||||
|
|
@ -49,7 +47,7 @@ In this package, all functions optional parameters are implemented as BGL option
|
||||||
In the following, we assume that the following types are provided as template parameters of surface mesh approximation functions and classes. Note that the type is more specific for some of these functions.
|
In the following, we assume that the following types are provided as template parameters of surface mesh approximation functions and classes. Note that the type is more specific for some of these functions.
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>`PolygonMesh` implements a `FaceGraph`
|
<li>`TriangleMesh` implements a `FaceListGraph`
|
||||||
<li>`GeomTraits` a geometric traits class in which constructions are performed and predicates evaluated. Everywhere in this package, a \cgal `Kernel` fulfills the requirements.
|
<li>`GeomTraits` a geometric traits class in which constructions are performed and predicates evaluated. Everywhere in this package, a \cgal `Kernel` fulfills the requirements.
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
@ -64,14 +62,14 @@ Here is the list of the named parameters available in this package:
|
||||||
\code
|
\code
|
||||||
typename CGAL::Kernel_traits<
|
typename CGAL::Kernel_traits<
|
||||||
typename boost::property_traits<
|
typename boost::property_traits<
|
||||||
typename boost::property_map<PolygonMesh, CGAL::vertex_point_t>::type>::value_type>::Kernel
|
typename boost::property_map<TriangleMesh, CGAL::vertex_point_t>::type>::value_type>::Kernel
|
||||||
\endcode
|
\endcode
|
||||||
\cgalNPEnd
|
\cgalNPEnd
|
||||||
|
|
||||||
\cgalNPBegin{vertex_point_map} \anchor VSA_vertex_point_map
|
\cgalNPBegin{vertex_point_map} \anchor VSA_vertex_point_map
|
||||||
is the property map with the points associated to the vertices of the polygon mesh `pmesh`.\n
|
is the property map with the points associated to the vertices of the polygon mesh `pmesh`.\n
|
||||||
\b Type: a class model of `ReadablePropertyMap` with
|
\b Type: a class model of `ReadablePropertyMap` with
|
||||||
`boost::graph_traits<PolygonMesh>::%vertex_descriptor` as key type and
|
`boost::graph_traits<TriangleMesh>::%vertex_descriptor` as key type and
|
||||||
`GeomTraits::Point_3` as value type. \n
|
`GeomTraits::Point_3` as value type. \n
|
||||||
\b Default value is \code boost::get(CGAL::vertex_point, pmesh)\endcode
|
\b Default value is \code boost::get(CGAL::vertex_point, pmesh)\endcode
|
||||||
\cgalNPEnd
|
\cgalNPEnd
|
||||||
|
|
@ -114,7 +112,7 @@ the chord subdivision threshold used in the meshing step.\n
|
||||||
|
|
||||||
\cgalNPBegin{face_proxy_map} \anchor VSA_face_proxy_map
|
\cgalNPBegin{face_proxy_map} \anchor VSA_face_proxy_map
|
||||||
the property map outputs the proxy index of each face of the input polygon mesh.\n
|
the property map outputs the proxy index of each face of the input polygon mesh.\n
|
||||||
\b Type: a class model of `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::%face_descriptor` as key type and the value type `std::size_t`\n
|
\b Type: a class model of `ReadWritePropertyMap` with `boost::graph_traits<TriangleMesh>::%face_descriptor` as key type and the value type `std::size_t`\n
|
||||||
\b Default : if this parameter is omitted, no output operation performed
|
\b Default : if this parameter is omitted, no output operation performed
|
||||||
\cgalNPEnd
|
\cgalNPEnd
|
||||||
|
|
||||||
|
|
@ -124,15 +122,15 @@ an `OutputIterator` to write proxies in.\n
|
||||||
\b Default : if this parameter is omitted, no output operation performed
|
\b Default : if this parameter is omitted, no output operation performed
|
||||||
\cgalNPEnd
|
\cgalNPEnd
|
||||||
|
|
||||||
\cgalNPBegin{anchor_vertices} \anchor VSA_anchor_vertices
|
\cgalNPBegin{anchor_points} \anchor VSA_anchor_points
|
||||||
an `OutputIterator` to write anchor vertices in.\n
|
an `OutputIterator` to write anchor points in.\n
|
||||||
\b Type : a class model of `OutputIterator` with `boost::graph_traits<PolygonMesh>::%vertex_descriptor` value type.\n
|
\b Type : a class model of `OutputIterator` with `boost::graph_traits<TriangleMesh>::%vertex_descriptor` value type.\n
|
||||||
\b Default : if this parameter is omitted, no output operation performed
|
\b Default : if this parameter is omitted, no output operation performed
|
||||||
\cgalNPEnd
|
\cgalNPEnd
|
||||||
|
|
||||||
\cgalNPBegin{output_mesh} \anchor VSA_output_mesh
|
\cgalNPBegin{indexed_triangles} \anchor VSA_indexed_triangles
|
||||||
a pointer to `CGAL::Polyhedron_3` to write the approximated surface mesh, constructed from the indexed triangles.\n
|
an `OutputIterator` to write indexed triangles in.\n
|
||||||
\b Type : a pointer to `CGAL::Polyhedron_3`\n
|
\b Type : a class model of `OutputIterator` with `CGAL::cpp11::array<std::size_t, 3>` value type.\n
|
||||||
\b Default : if this parameter is omitted, no output operation performed
|
\b Default : if this parameter is omitted, no output operation performed
|
||||||
\cgalNPEnd
|
\cgalNPEnd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,21 +32,15 @@ The page \ref namedparameters describes their usage
|
||||||
and provides the list of parameters used in this package.
|
and provides the list of parameters used in this package.
|
||||||
|
|
||||||
## Concepts ##
|
## Concepts ##
|
||||||
- `Proxy`
|
|
||||||
- `ErrorMetric`
|
- `ErrorMetric`
|
||||||
- `ProxyFitting`
|
|
||||||
|
|
||||||
## Main Functions ##
|
## Main Functions ##
|
||||||
- `CGAL::VSA::mesh_approximation()`
|
- `CGAL::mesh_approximation()`
|
||||||
- `CGAL::VSA::mesh_segmentation()`
|
|
||||||
|
|
||||||
## Classes ##
|
## Classes ##
|
||||||
- `CGAL::VSA::Plane_proxy`
|
- `CGAL::L21_metric`
|
||||||
- `CGAL::VSA::L21_metric`
|
- `CGAL::L2_metric`
|
||||||
- `CGAL::VSA::L21_proxy_fitting`
|
- `CGAL::VSA_approximation`
|
||||||
- `CGAL::VSA::L2_metric`
|
|
||||||
- `CGAL::VSA::L2_proxy_fitting`
|
|
||||||
- `CGAL::VSA::Mesh_approximation`
|
|
||||||
|
|
||||||
\todo add option to enforce guarantee of 2-manifold and oriented output mesh
|
\todo add option to enforce guarantee of 2-manifold and oriented output mesh
|
||||||
\todo add traits class to design custom proxies
|
\todo add traits class to design custom proxies
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue