From 4b0243d263d4e4b6df80b1acd73741c037294a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 24 Oct 2016 15:11:26 +0200 Subject: [PATCH] Added documentation for PMP's longest_border() --- .../CGAL/Polygon_mesh_processing/measure.h | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 5c9e6bcc39d..c265a756133 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -199,17 +199,45 @@ namespace Polygon_mesh_processing { CGAL::Polygon_mesh_processing::parameters::all_default()); } - + /** + * \ingroup measure_grp + * finds the longest border of a given triangulated surface and returns + * a halfedge that is part of this border and the length of this border. + * + * @tparam PolygonMesh a model of `HalfedgeGraph` + * @tparam NamedParameters a sequence of \ref namedparameters + * + * @param pmesh the polygon mesh + * @param np optional sequence of \ref namedparameters among the ones listed below + * + * \cgalNamedParamsBegin + * \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. + * If this parameter is omitted, an internal property map for + * `CGAL::vertex_point_t` should be available in `PolygonMesh`\cgalParamEnd + * \cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd + * \cgalNamedParamsEnd + * + * @return a pair composed of two members: + * - `first`: a halfedge on the longest border. + * The return type `halfedge_descriptor` is a halfedge descriptor. It is + * deduced from the graph traits corresponding to the type `PolygonMesh`. + * - `second`: the length of the longest border + * The return type `FT` is a number type. It is + * either deduced from the `geom_traits` \ref namedparameters if provided, + * or the geometric traits class deduced from the point property map + * of `pmesh` + * + */ template #ifdef DOXYGEN_RUNNING - FT + std::pair #else std::pair::halfedge_descriptor, typename GetGeomTraits::type::FT> #endif longest_border(const PolygonMesh& pmesh - , const NamedParameters& np) + , const NamedParameters& np) { typedef typename CGAL::Kernel_traits::type>::Kernel::FT FT;