From 4bbda56a37c9f9a974e43fb192b07a756bd360e7 Mon Sep 17 00:00:00 2001 From: Lingjie Zhu Date: Tue, 6 Mar 2018 16:27:19 +0800 Subject: [PATCH] reference manual with groups --- .../Surface_mesh_approximation/dependencies | 1 + .../include/CGAL/VSA_approximation.h | 95 ++++++++++++------- .../include/CGAL/mesh_approximation.h | 2 +- 3 files changed, 62 insertions(+), 36 deletions(-) diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/dependencies b/Surface_mesh_approximation/doc/Surface_mesh_approximation/dependencies index d2fa6db6731..82b43d0eda3 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/dependencies +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/dependencies @@ -7,3 +7,4 @@ Stream_support Polyhedron Surface_mesh BGL +Principal_component_analysis diff --git a/Surface_mesh_approximation/include/CGAL/VSA_approximation.h b/Surface_mesh_approximation/include/CGAL/VSA_approximation.h index 9322a31410b..3a5e9f18ad3 100644 --- a/Surface_mesh_approximation/include/CGAL/VSA_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/VSA_approximation.h @@ -42,28 +42,24 @@ namespace CGAL { -/*! - * \ingroup PkgTSMA - * @brief Seeding method enumeration for Variational Shape Approximation algorithm. - */ - enum Approximation_seeding_tag { - /// Random seeding - Random, - /// Incremental seeding - Incremental, - /// Hierarchical seeding - Hierarchical - }; +/// \ingroup PkgTSMA +/// @brief Seeding method enumeration for Variational Shape Approximation algorithm. +enum Approximation_seeding_tag { + /// Random seeding + Random, + /// Incremental seeding + Incremental, + /// Hierarchical seeding + Hierarchical +}; -/*! - * \ingroup PkgTSMA - * @brief Main class for Variational Shape Approximation algorithm. - * @tparam TriangleMesh a CGAL TriangleMesh - * @tparam VertexPointMap vertex point map - * @tparam ErrorMetric approximation metric type - * @tparam GeomTraits geometric traits type - * @tparam Concurrency_tag concurrency tag - */ +/// \ingroup PkgTSMA +/// @brief Main class for Variational Shape Approximation algorithm. +/// @tparam TriangleMesh a CGAL TriangleMesh +/// @tparam VertexPointMap vertex point map +/// @tparam ErrorMetric approximation metric type +/// @tparam GeomTraits geometric traits type +/// @tparam Concurrency_tag concurrency tag template ::value_type >::Kernel >::type Geom_traits; - /// ErrorMetric type +#else + typedef GeomTraits Geom_traits; +#endif + // ErrorMetric type +#ifndef DOXYGEN_RUNNING typedef typename CGAL::Default::Get >::type Error_metric; - /// Proxy type +#else + typedef ErrorMetric Error_metric; +#endif + // Proxy type typedef typename Error_metric::Proxy Proxy; + /// @} // private typedefs and data member private: @@ -260,8 +267,10 @@ private: //member functions public: + /// \name Construction + /// @{ /*! - * %Default constructor. + * @brief %Default empty constructor */ VSA_approximation() : m_ptm(NULL), @@ -278,7 +287,7 @@ public: } /*! - * Initialize and prepare for the approximation. + * @brief Initialize and prepare for the approximation. * @param tm `CGAL TriangleMesh` on which approximation operates. * @param vpoint_map vertex point map of the mesh */ @@ -302,7 +311,7 @@ public: m_fproxy_map = CGAL::internal::add_property( Face_proxy_tag("VSA-face_proxy"), *(const_cast(m_ptm))); } - + /// @} ~VSA_approximation() { if (m_ptm) { @@ -311,8 +320,10 @@ public: } } + /// \name Setup + /// @{ /*! - * Set the mesh for approximation and rebuild the internal data structure. + * @brief Set the mesh for approximation and rebuild the internal data structure. * @pre @a tm.is_pure_triangle() * @param tm `CGAL TriangleMesh` on which approximation operates. * @param vpoint_map vertex point map of the mesh @@ -324,7 +335,7 @@ public: } /*! - * Set the apprroximation traits. + * @brief Set the apprroximation traits. * @param approx_traits an `ErrorMetric` object. */ void set_metric(const Error_metric &approx_traits) { @@ -332,7 +343,7 @@ public: } /*! - * Rebuild the internal data structure. + * @brief Rebuild the internal data structure. */ void rebuild() { // cleanup @@ -358,8 +369,11 @@ public: BOOST_FOREACH(vertex_descriptor v, vertices(*m_ptm)) put(m_vanchor_map, v, CGAL_VSA_INVALID_TAG); } + /// @} - /*! + /// \name Processing + /// @{ + /*! * @brief Initialize the seeds with both maximum number of proxies * and minmum error drop stop criteria. * The first criterion met stops the seeding. @@ -602,8 +616,11 @@ public: return num_added; } + /// @} - /*! + /// \name Refinement Operations + /// @{ + /*! * @brief Teleport the local minima to the worst region, this combines the merging and adding processes. * The re-fitting is performed after each teleportation. * Here if we specify more than one proxy this means we teleport in a naive iterative fashion. @@ -838,8 +855,11 @@ public: return true; } + /// @} - /*! + /// \name Meshing + /// @{ + /*! * @brief Extract the approximated indexed triangle surface. * @note If the extracted surface mesh contains non-manifold facets, * they are not built into the output polyhedron. @@ -885,8 +905,12 @@ public: CGAL::Polyhedron_3 tm_test; return build_polyhedron_surface(tm_test); } + /// @} - /*! + + /// \name Output + /// @{ + /*! * @brief Get the facet-proxy index map. * @tparam FacetProxyMap `WritablePropertyMap` with * `boost::graph_traits::%face_descriptor` as key and `std::size_t` as value type @@ -995,6 +1019,7 @@ public: *out_itr++ = plg; } } + /// @} // private member functions private: diff --git a/Surface_mesh_approximation/include/CGAL/mesh_approximation.h b/Surface_mesh_approximation/include/CGAL/mesh_approximation.h index e2a61c231fe..57f443db182 100644 --- a/Surface_mesh_approximation/include/CGAL/mesh_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/mesh_approximation.h @@ -35,7 +35,7 @@ namespace CGAL { * Exact constructions kernels are not supported by this function. * \cgalParamEnd * \cgalParamBegin{vertex_point_map} the property map with the points associated - * to the vertices of `tm`. Instance of a class model of `ReadWritePropertyMap`. + * to the vertices of `tm`. Instance of a class model of `ReadablePropertyMap`. * \cgalParamEnd * \cgalParamBegin{seeding_method} selection of seeding method. * \cgalParamEnd