From 40c6a25fe0b169654e03ab9f20ba6304ee619db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 13 Dec 2024 14:17:00 +0100 Subject: [PATCH 1/6] Move functions --- .../Hyperbolic_Delaunay_triangulation_2.h | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h index d95bfe27fba8..0b79c1af1b3d 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -740,6 +740,32 @@ class Hyperbolic_Delaunay_triangulation_2 Hyperbolic_segment segment(const Edge& e) const { return hyperbolic_segment(e); } Hyperbolic_segment segment(const Edge_circulator& e) const { return hyperbolic_segment(e); } + const Point& point(const Vertex_handle vh) const + { + CGAL_precondition(!is_infinite(vh)); + return vh->point(); + } + + const Point& point(const Face_handle fh, const int i) const + { + CGAL_precondition(!is_infinite(fh->vertex(i))); + CGAL_precondition(0 <= i && i <= 2); + return fh->vertex(i)->point(); + } + + Point& point(const Vertex_handle vh) + { + CGAL_precondition(!is_infinite(vh)); + return vh->point(); + } + + Point& point(const Face_handle fh, const int i) + { + CGAL_precondition(!is_infinite(fh->vertex(i))); + CGAL_precondition(0 <= i && i <= 2); + return fh->vertex(i)->point(); + } + size_type number_of_vertices() const { return Base::number_of_vertices(); } Vertex_circulator adjacent_vertices(Vertex_handle v) const { return Vertex_circulator(v, *this); } @@ -825,32 +851,6 @@ class Hyperbolic_Delaunay_triangulation_2 } public: - const Point& point(const Vertex_handle vh) const - { - CGAL_precondition(!is_infinite(vh)); - return vh->point(); - } - - const Point& point(const Face_handle fh, const int i) const - { - CGAL_precondition(!is_infinite(fh->vertex(i))); - CGAL_precondition(0 <= i && i <= 2); - return fh->vertex(i)->point(); - } - - Point& point(const Vertex_handle vh) - { - CGAL_precondition(!is_infinite(vh)); - return vh->point(); - } - - Point& point(const Face_handle fh, const int i) - { - CGAL_precondition(!is_infinite(fh->vertex(i))); - CGAL_precondition(0 <= i && i <= 2); - return fh->vertex(i)->point(); - } - bool is_valid() { if (!Base::is_valid()) From 1bd0c37aadba35f733555abe07a0b9e913f049e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 13 Dec 2024 14:17:17 +0100 Subject: [PATCH 2/6] Document point() in hyperbolic triangulations --- .../CGAL/Hyperbolic_Delaunay_triangulation_2.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h index ef2d984340b3..b89c95f56560 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -200,7 +200,19 @@ class Hyperbolic_Delaunay_triangulation_2: private Delaunay_triangulation_2 Date: Fri, 13 Dec 2024 14:18:22 +0100 Subject: [PATCH 3/6] Document point() in periodic triangulations --- .../CGAL/Periodic_2_triangulation_2.h | 12 ++++++++++++ .../CGAL/Periodic_3_triangulation_3.h | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index 05f9da516bcb..bf38307c1b68 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -593,6 +593,18 @@ class Periodic_2_triangulation_2 : public Triangulation_cw_ccw_2 */ Triangle triangle(const Periodic_triangle & t) const; + /*! + Equivalent to + the call `t.point(t.periodic_point(fh,i));` + */ + Point point(Face_handle fh, int i) const; + + /*! + Equivalent to + the call `t.point(t.periodic_point(v));` + */ + Point point(Vertex_handle v) const; + /*! Equivalent to the call `t.segment(t.periodic_segment(f,i));` diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_3.h index 254a7a26b118..8a4de97b43ae 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_3.h @@ -551,6 +551,24 @@ size_type number_of_stored_facets() const; /// `Periodic_triangle`, and `Periodic_tetrahedron`, which have inner type `Point`. /// @{ +/*! +Converts the `Periodic_point` `pp` (point-offset pair) to the +corresponding `Point` in \f$ \mathbb R^3\f$. +*/ +Point point(const Periodic_point& pp) const; + +/*! +Equivalent to +the call `t.point(t.periodic_point(v));` +*/ +Point point(Vertex_handle v) const; + +/*! +Equivalent to +the call `t.point(t.periodic_point(c,idx));` +*/ +Point point(Cell_handle c, int idx) const; + /*! Returns the periodic point given by vertex `v`. If `t` is represented in the 1-sheeted covering space, the offset is always From 195616fcf36d5fdccb425164502d33b2d4f19ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 13 Dec 2024 14:18:35 +0100 Subject: [PATCH 4/6] Document point() in 2D Euclidean triangulations --- .../doc/Triangulation_2/CGAL/Triangulation_2.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h index 570114a5b999..14f525135437 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h @@ -1191,6 +1191,18 @@ Returns the line segment corresponding to edge `*ei`. Segment segment(const Edge_iterator& ei) const; +/*! +Returns the point given by vertex `i` of face `f`. +\pre `t.dimension()` \f$ \geq0\f$ and f$ i \in\{0,1,2\}\f$ in dimension 2, \f$ i \in\{0,1\}\f$ in dimension 1, \f$ i = 0\f$ in dimension 0, and the vertex is finite. +*/ +const Point& point(Face_handle f, int i) const; + +/*! +Same as the previous method for vertex `v`. +\pre `t.dimension()` \f$ \geq0\f$ and the vertex is finite. +*/ +const Point& point(Vertex_handle v) const; + /*! Compute the circumcenter of the face pointed to by f. This function is available only if the corresponding function is provided in the From f15f8c691cafd235538d6f70dab9749267b56c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 13 Dec 2024 14:18:46 +0100 Subject: [PATCH 5/6] Fix typo --- .../CGAL/Periodic_2_triangulation_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index bf38307c1b68..1124eeab784f 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -579,7 +579,7 @@ class Periodic_2_triangulation_2 : public Triangulation_cw_ccw_2 /*! Converts the `Periodic_point` `pp` (point-offset pair) to the - corresponding `Point` in \f$ \mathbb R^3\f$. + corresponding `Point` in \f$ \mathbb R^2\f$. */ Point point(const Periodic_point & pp ) const; From 2b5682f72dd727365f937ba93bc44366382ddd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 13 Dec 2024 14:32:48 +0100 Subject: [PATCH 6/6] Fix missing backslash in math equation --- Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h index 14f525135437..a8ac0f354cc1 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h @@ -1193,7 +1193,7 @@ segment(const Edge_iterator& ei) const; /*! Returns the point given by vertex `i` of face `f`. -\pre `t.dimension()` \f$ \geq0\f$ and f$ i \in\{0,1,2\}\f$ in dimension 2, \f$ i \in\{0,1\}\f$ in dimension 1, \f$ i = 0\f$ in dimension 0, and the vertex is finite. +\pre `t.dimension()` \f$ \geq0\f$ and \f$ i \in\{0,1,2\}\f$ in dimension 2, \f$ i \in\{0,1\}\f$ in dimension 1, \f$ i = 0\f$ in dimension 0, and the vertex is finite. */ const Point& point(Face_handle f, int i) const;