From f3b8c0f657b40e1e4c9d366d425bb259051734b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 5 May 2017 13:11:29 +0200 Subject: [PATCH] Kinetic regular vertex/cell base must inherit the Cgal::regular_tri vertex/cell base and not simply the cgal::tri_vertex/cell_base --- .../Regular_triangulation_cell_base_3.h | 63 ++++++++++--------- .../Regular_triangulation_vertex_base_3.h | 55 ++++++++-------- 2 files changed, 63 insertions(+), 55 deletions(-) diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h b/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h index deeb3f4464f..e798fabe44e 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_cell_base_3.h @@ -23,42 +23,49 @@ #include #include +#include namespace CGAL { namespace Kinetic { //! A class to track labels of edges of faces in a triangulation -template > -class Regular_triangulation_cell_base_3: public Delaunay_triangulation_cell_base_3 +template > +class Regular_triangulation_cell_base_3 + : public Delaunay_triangulation_cell_base_3 { - private: - typedef typename Cell_base::Triangulation_data_structure TDS; - public: - typedef TDS Triangulation_data_structure; - typedef typename TDS::Cell_handle Cell_handle; - typedef typename TDS::Vertex_handle Vertex_handle; - typedef typename Cell_base::Geom_traits Traits; +private: + typedef typename Cell_base::Triangulation_data_structure TDS; - typedef typename SimulationTraits::Simulator::Event_key Edge_label; - typedef Edge_label Facet_label; - Regular_triangulation_cell_base_3(): Cell_base() { - } +public: + typedef TDS Triangulation_data_structure; + typedef typename TDS::Cell_handle Cell_handle; + typedef typename TDS::Vertex_handle Vertex_handle; + typedef typename Cell_base::Geom_traits Traits; - Regular_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1, - Vertex_handle v2, Vertex_handle v3): Cell_base(v0, v1, v2, v3) { - } + typedef typename SimulationTraits::Simulator::Event_key Edge_label; + typedef Edge_label Facet_label; + Regular_triangulation_cell_base_3(): Cell_base() { } - Regular_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1, - Vertex_handle v2, Vertex_handle v3, - Cell_handle f0, Cell_handle f1, - Cell_handle f2, Cell_handle f3): Cell_base(v0,v1,v2, v3, f0,f1,f2, f3) { - } + Regular_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1, + Vertex_handle v2, Vertex_handle v3) + : Cell_base(v0, v1, v2, v3) + { } - template < typename TDS3 > - struct Rebind_TDS - { - typedef typename Cell_base::template Rebind_TDS::Other Cb3; - typedef Delaunay_triangulation_cell_base_3 Other; - }; + Regular_triangulation_cell_base_3(Vertex_handle v0, Vertex_handle v1, + Vertex_handle v2, Vertex_handle v3, + Cell_handle f0, Cell_handle f1, + Cell_handle f2, Cell_handle f3) + : Cell_base(v0,v1,v2, v3, f0,f1,f2, f3) + { } + + template < typename TDS3 > + struct Rebind_TDS + { + typedef typename Cell_base::template Rebind_TDS::Other Cb3; + typedef Delaunay_triangulation_cell_base_3 Other; + }; }; } } //namespace CGAL::Kinetic -#endif + +#endif // CGAL_KINETIC_KINETIC_REGULAR_CELL_BASE_3_H diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h b/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h index 9e929c53dcf..84e2cb633ff 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_vertex_base_3.h @@ -22,43 +22,44 @@ #define CGAL_KINETIC_KINETIC_REGULAR_VERTEX_BASE_3_H #include -#include +#include #include namespace CGAL { namespace Kinetic { //! A class to track labels of edges of faces in a triangulation template > -class Regular_triangulation_vertex_base_3: -public CGAL::Triangulation_vertex_base_with_info_3 + class Vertex_base = CGAL::Regular_triangulation_vertex_base_3< + typename SimulationTraits::Instantaneous_kernel> > +class Regular_triangulation_vertex_base_3 + : public CGAL::Triangulation_vertex_base_with_info_3< + typename SimulationTraits::Simulator::Event_key, + typename SimulationTraits::Instantaneous_kernel, + Vertex_base> { - private: - typedef CGAL::Triangulation_vertex_base_with_info_3 P; - typedef typename Vertex_base::Triangulation_data_structure TDS; - public: - typedef TDS Triangulation_data_structure; - typedef typename TDS::Cell_handle Cell_handle; - typedef typename TDS::Vertex_handle Vertex_handle; - typedef typename Vertex_base::Geom_traits Traits; +private: + typedef CGAL::Triangulation_vertex_base_with_info_3< + typename SimulationTraits::Simulator::Event_key, + typename SimulationTraits::Instantaneous_kernel, + Vertex_base> P; + typedef typename Vertex_base::Triangulation_data_structure TDS; - typedef typename SimulationTraits::Simulator::Event_key Label; +public: + typedef TDS Triangulation_data_structure; + typedef typename TDS::Cell_handle Cell_handle; + typedef typename TDS::Vertex_handle Vertex_handle; + typedef typename Vertex_base::Geom_traits Traits; - Regular_triangulation_vertex_base_3(): P() { - } + typedef typename SimulationTraits::Simulator::Event_key Label; - Regular_triangulation_vertex_base_3(Cell_handle f): P(f) { - } + Regular_triangulation_vertex_base_3(): P() { } + Regular_triangulation_vertex_base_3(Cell_handle f): P(f) { } - template < typename TDS3 > - struct Rebind_TDS - { - typedef typename Vertex_base::template Rebind_TDS::Other Cb3; - typedef Regular_triangulation_vertex_base_3 Other; - }; + template < typename TDS3 > + struct Rebind_TDS + { + typedef typename Vertex_base::template Rebind_TDS::Other Cb3; + typedef Regular_triangulation_vertex_base_3 Other; + }; }; } } //namespace CGAL::Kinetic