From de92d890711f32d3c35ad62cdcccc36a997c1dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 4 Jun 2024 17:34:13 +0200 Subject: [PATCH] Also read and write the sphere's center and radius --- .../include/CGAL/Triangulation_on_sphere_2.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h index ddd883b38fd..98c2949173c 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h @@ -1341,6 +1341,7 @@ void Triangulation_on_sphere_2:: file_output(std::ostream& os) const { + os << _gt.center() << " " << _gt.radius() << "\n"; _tds.file_output(os, Vertex_handle(), true); } @@ -1350,6 +1351,13 @@ Triangulation_on_sphere_2:: file_input(std::istream& is) { clear(); + + Point_3 center; + FT radius; + is >> center >> radius; + _gt.set_center(center); + _gt.set_radius(radius); + Vertex_handle v = _tds.file_input(is, false); CGAL_triangulation_assertion(is_valid()); return v;