From 109056d5928ebf8dc6b51a15af8606fea6b03460 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 22 Mar 2022 14:10:13 +0100 Subject: [PATCH] Improve documentation of function draw() --- Mesh_2/examples/Mesh_2/mesh_marked_domain.cpp | 2 +- .../CGAL/draw_triangulation_2.h | 25 ++++++++++++++++--- .../Triangulation_2/polygon_triangulation.cpp | 2 +- .../include/CGAL/draw_triangulation_2.h | 2 ++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Mesh_2/examples/Mesh_2/mesh_marked_domain.cpp b/Mesh_2/examples/Mesh_2/mesh_marked_domain.cpp index 190e5ccb558..1f0d172d8df 100644 --- a/Mesh_2/examples/Mesh_2/mesh_marked_domain.cpp +++ b/Mesh_2/examples/Mesh_2/mesh_marked_domain.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/draw_triangulation_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/draw_triangulation_2.h index 2ecef01ac43..97d9109e556 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/draw_triangulation_2.h @@ -3,14 +3,33 @@ namespace CGAL { /*! \ingroup PkgDrawTriangulation2 -opens a new window and draws `at2`, a model of the `TriangulationDataStructure_2` concept. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. +opens a new window and draws a triangulation. +A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. -\tparam T2 a model of the `TriangulationDataStructure_2` concept. + +\tparam T2 a triangulation class derived from `Triangulation_2` or `Constrained_triangulation_2` \param at2 the triangulation to draw. */ template void draw(const T2& at2); -} /* namespace CGAL */ + /*! +\ingroup PkgDrawTriangulation2 +opens a new window and draws a triangulation. +A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. +Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. + +\tparam CT a triangulation class derived from `Triangulation_2` or `Constrained_triangulation_2` +\tparam InDomainPMap a class model of `ReadWritePropertyMap` with +`CT::Face_handle` as key type and `bool` as value type. + +\param at2 the triangulation to draw. +\param ipm the property map defining the faces which are in the domain. + +*/ + template + void draw(const CT2& act, InDomainPMap ipm); + +} /* namespace CGAL */ diff --git a/Triangulation_2/examples/Triangulation_2/polygon_triangulation.cpp b/Triangulation_2/examples/Triangulation_2/polygon_triangulation.cpp index fd72756871c..960ea8753a9 100644 --- a/Triangulation_2/examples/Triangulation_2/polygon_triangulation.cpp +++ b/Triangulation_2/examples/Triangulation_2/polygon_triangulation.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 9fabd041833..72833bad054 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -21,6 +21,8 @@ #include #include +#include + namespace CGAL {