update doc

This commit is contained in:
Lingjie Zhu 2018-03-06 10:58:24 +08:00
parent 66f6c52a7b
commit a362d6d83a
5 changed files with 31 additions and 79 deletions

View File

@ -2,10 +2,10 @@
\ingroup PkgTSMAConcepts
\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::VSA::L2_metric`
\cgalHasModel `CGAL::L21_metric`
\cgalHasModel `CGAL::L2_metric`
*/
class ErrorMetric {
@ -14,15 +14,20 @@ public:
typedef unspecified_type FT;
/// Triangle mesh face descriptor.
typedef unspecified_type face_descriptor;
/// Parametrized shape proxy.
/// Parameterized shape proxy.
typedef unspecified_type Proxy;
/// @name Operations
/// A model of this concept must provide:
/// @{
/// returns the fitting error of a face f to the proxy px.
FT operator()(const face_descriptor &f, const Proxy &px) const;
/// returns the fitting error of a face f to the Proxy px.
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;
/// }
};

View File

@ -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.
/// }
};

View File

@ -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;
/// }
};

View File

@ -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.
\code
// input: input triangle mesh to be approximated
// output: output polyhedron mesh
// points: output anchor points
// triangles: output triplets of indexed triangles
// tm: input triangle mesh to be approximated
// method: seed initialization method
// nb_proxies: number of proxies used to approximate the geometry
// nb_iterations: number of iterations after initialization
// points: output anchor points
// triangles: output triplets of indexed triangles
CGAL::VSA::mesh_approximation(input,
std::back_inserter(points),
std::back_inserter(triangles),
CGAL::mesh_approximation(tm,
CGAL::VSA::parameters::seeding_method(method).
max_nb_proxies(nb_proxies).
nb_of_iterations(nb_iterations).
output_mesh(&output));
anchor_points(std::back_inserter(points)).
indexed_triangles(std::back_inserter(triangles)));
\endcode
\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.
<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.
</ul>
@ -64,14 +62,14 @@ Here is the list of the named parameters available in this package:
\code
typename CGAL::Kernel_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
\cgalNPEnd
\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
\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
\b Default value is \code boost::get(CGAL::vertex_point, pmesh)\endcode
\cgalNPEnd
@ -114,7 +112,7 @@ the chord subdivision threshold used in the meshing step.\n
\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
\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
\cgalNPEnd
@ -124,15 +122,15 @@ an `OutputIterator` to write proxies in.\n
\b Default : if this parameter is omitted, no output operation performed
\cgalNPEnd
\cgalNPBegin{anchor_vertices} \anchor VSA_anchor_vertices
an `OutputIterator` to write anchor vertices in.\n
\b Type : a class model of `OutputIterator` with `boost::graph_traits<PolygonMesh>::%vertex_descriptor` value type.\n
\cgalNPBegin{anchor_points} \anchor VSA_anchor_points
an `OutputIterator` to write anchor points in.\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
\cgalNPEnd
\cgalNPBegin{output_mesh} \anchor VSA_output_mesh
a pointer to `CGAL::Polyhedron_3` to write the approximated surface mesh, constructed from the indexed triangles.\n
\b Type : a pointer to `CGAL::Polyhedron_3`\n
\cgalNPBegin{indexed_triangles} \anchor VSA_indexed_triangles
an `OutputIterator` to write indexed triangles in.\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
\cgalNPEnd

View File

@ -32,21 +32,15 @@ The page \ref namedparameters describes their usage
and provides the list of parameters used in this package.
## Concepts ##
- `Proxy`
- `ErrorMetric`
- `ProxyFitting`
## Main Functions ##
- `CGAL::VSA::mesh_approximation()`
- `CGAL::VSA::mesh_segmentation()`
- `CGAL::mesh_approximation()`
## Classes ##
- `CGAL::VSA::Plane_proxy`
- `CGAL::VSA::L21_metric`
- `CGAL::VSA::L21_proxy_fitting`
- `CGAL::VSA::L2_metric`
- `CGAL::VSA::L2_proxy_fitting`
- `CGAL::VSA::Mesh_approximation`
- `CGAL::L21_metric`
- `CGAL::L2_metric`
- `CGAL::VSA_approximation`
\todo add option to enforce guarantee of 2-manifold and oriented output mesh
\todo add traits class to design custom proxies