From dd636afbc33762d6fd8eef4b45ec4e0a4ccb0f32 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 18 Dec 2020 08:18:00 +0000 Subject: [PATCH] Use SNC_const_decorator for additional sorts and finds --- Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 32 +++++++++++------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h index 71c6a679986..9220c696ee2 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -120,7 +120,6 @@ typename Type_converter::Vector_3 get_vector(const CGAL::Vector_3& v){ ret template class moreLeft : public T { - typedef typename T::SM_decorator SM_decorator; typedef typename T::SHalfedge_handle SHalfedge_handle; typedef typename T::Vector_3 Vector_3; typedef typename T::FT FT; @@ -135,7 +134,6 @@ class moreLeft : public T { if(se2 == SHalfedge_handle()) return -1; - SM_decorator SM(&*se1->source()->source()); Vector_3 vec1 = se1->circle().orthogonal_vector(); Vector_3 vec2 = se2->circle().orthogonal_vector(); @@ -215,17 +213,17 @@ class sort_edges : public SNC_const_decorator { }; template -class sort_facets : public SNC_decorator { +class sort_facets : public SNC_const_decorator { typedef T SNC_structure; - typedef SNC_decorator Base; + typedef SNC_const_decorator Base; typedef typename T::Halffacet_handle Halffacet_handle; typedef typename T::SHalfedge_handle SHalfedge_handle; typedef typename T::Vector_3 Vector_3; typedef typename T::Plane_3 Plane_3; public: - sort_facets(T& D) : Base(D) {} + sort_facets(const T& D) : Base(D) {} bool operator() (Halffacet_handle f1, Halffacet_handle f2) const { @@ -322,14 +320,14 @@ class sort_sedges : public SNC_const_decorator { template -class sort_sloops : public SNC_decorator { +class sort_sloops : public SNC_const_decorator { typedef T SNC_structure; - typedef CGAL::SNC_decorator Base; + typedef CGAL::SNC_const_decorator Base; typedef typename T::SHalfloop_handle SHalfloop_handle; public: - sort_sloops(T& D) : Base(D) {} + sort_sloops(const T& D) : Base(D) {} bool operator() (SHalfloop_handle sl1, SHalfloop_handle sl2) const { if(sl1 == sl2) return false; @@ -414,10 +412,10 @@ class sort_sface_cycle_entries : public SNC_const_decorator { }; template -class sort_sfaces : public SNC_decorator { +class sort_sfaces : public SNC_const_decorator { typedef T SNC_structure; - typedef CGAL::SNC_decorator Base; + typedef CGAL::SNC_const_decorator Base; typedef typename T::SM_decorator SM_decorator; typedef typename T::Point_3 Point_3; typedef typename T::Vector_3 Vector_3; @@ -430,7 +428,7 @@ class sort_sfaces : public SNC_decorator { SHalfedge_around_sface_circulator; public: - sort_sfaces(T& D) : Base(D) {} + sort_sfaces(const T& D) : Base(D) {} bool operator() (SFace_handle sf1, SFace_handle sf2) const { CGAL_NEF_TRACEN("sort sfaces"); @@ -530,15 +528,15 @@ class sort_sfaces : public SNC_decorator { }; template -class sort_volumes : public SNC_decorator { +class sort_volumes : public SNC_const_decorator { typedef T SNC_structure; - typedef CGAL::SNC_decorator Base; + typedef CGAL::SNC_const_decorator Base; typedef typename T::Volume_handle Volume_handle; typedef typename T::SFace_handle SFace_handle; public: - sort_volumes(T& D) : Base(D) {} + sort_volumes(const T& D) : Base(D) {} bool operator() (Volume_handle c1, Volume_handle c2) const { CGAL_NEF_TRACEN("sort volumes"); @@ -627,10 +625,10 @@ class sort_shell_entries : public T { }; template -struct find_minimal_sface_of_shell : public SNC_decorator { +struct find_minimal_sface_of_shell : public SNC_const_decorator { typedef T SNC_structure; - typedef CGAL::SNC_decorator Base; + typedef CGAL::SNC_const_decorator Base; typedef typename T::Vertex_handle Vertex_handle; typedef typename T::Halfedge_handle Halfedge_handle; typedef typename T::Halffacet_handle Halffacet_handle; @@ -643,7 +641,7 @@ struct find_minimal_sface_of_shell : public SNC_decorator { SFace_handle sf_min; sort_sfaces SORT; - find_minimal_sface_of_shell(T& D, SFace_visited_hash& Vi) + find_minimal_sface_of_shell(const T& D, SFace_visited_hash& Vi) : Base(D), Done(Vi), SORT(D) {} void visit(SFace_handle h) {