From 5f947ebea978b5509aa1f57c9a9cc20a085ee42c Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Thu, 7 Jun 2001 16:54:21 +0000 Subject: [PATCH] - Cleanup vertex_3 and cell_3. - Move #include <...short_names> before all the others. --- Packages/Triangulation_3/changes.txt | 3 + .../include/CGAL/Delaunay_triangulation_3.h | 2 +- .../include/CGAL/Triangulation_cell_3.h | 56 +++--------- .../CGAL/Triangulation_data_structure_3.h | 6 +- .../include/CGAL/Triangulation_ds_cell_3.h | 2 +- .../include/CGAL/Triangulation_handles_3.h | 3 +- .../include/CGAL/Triangulation_vertex_3.h | 87 ++++--------------- 7 files changed, 36 insertions(+), 123 deletions(-) diff --git a/Packages/Triangulation_3/changes.txt b/Packages/Triangulation_3/changes.txt index a6f2c719fb3..4efd87a8147 100644 --- a/Packages/Triangulation_3/changes.txt +++ b/Packages/Triangulation_3/changes.txt @@ -1,3 +1,6 @@ +Version 1.58 (7 June 01) +- Cleanup vertex_3 and cell_3. + Version 1.57 (5 June 01) - Add missing typename for MipsPro. diff --git a/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index 59ffe9e5b2d..c7bac467008 100644 --- a/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Packages/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -31,10 +31,10 @@ #include #include +#include #include #include -#include #include #include diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h index ef94ed1812e..6a6c046515f 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_cell_3.h @@ -23,52 +23,37 @@ #ifndef CGAL_TRIANGULATION_CELL_3_H #define CGAL_TRIANGULATION_CELL_3_H -#include -#include - #include CGAL_BEGIN_NAMESPACE -template < class Gt, class Tds > -class Triangulation_vertex_3; - -template < class Gt, class Tds > -class Triangulation_vertex_handle_3; - -template < class Gt, class Tds > -class Triangulation_cell_handle_3; +template < class Gt, class Tds > class Triangulation_vertex_3; +template < class Gt, class Tds > class Triangulation_vertex_handle_3; +template < class Gt, class Tds > class Triangulation_cell_handle_3; template < class Gt, class Tds > class Triangulation_cell_3 : public Tds::Cell { -public: - - typedef typename Gt::Point_3 Point; - typedef typename Tds::Vertex Vtds; typedef typename Tds::Cell Ctds; typedef Triangulation_vertex_3 Vertex; - typedef Triangulation_vertex_handle_3 Vertex_handle; typedef Triangulation_cell_handle_3 Cell_handle; - Triangulation_cell_3() - : Ctds() - { } +public: -// Triangulation_cell_3(Tds& tds) -// : Ctds(tds) -// { } + typedef typename Gt::Point_3 Point; + + Triangulation_cell_3() + : Ctds() {} Triangulation_cell_3(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3) - : Ctds(&(*v0), &(*v1), &(*v2), &(*v3)) - {} + : Ctds(&(*v0), &(*v1), &(*v2), &(*v3)) {} Triangulation_cell_3(Vertex_handle v0, Vertex_handle v1, @@ -79,8 +64,7 @@ public: Cell_handle n2, Cell_handle n3) : Ctds(&(*v0), &(*v1), &(*v2), &(*v3), - &(*n0), &(*n1), &(*n2), &(*n3)) - {} + &(*n0), &(*n1), &(*n2), &(*n3)) {} // Vertex access functions Vertex_handle vertex(int i) const @@ -119,11 +103,6 @@ public: return Ctds::mirror_vertex(i); } - int mirror_index(int i) const - { - return Ctds::mirror_index(i); - } - bool has_neighbor(Cell_handle c) const { return Ctds::has_neighbor( &(*c)); @@ -156,16 +135,6 @@ public: Ctds::set_neighbors(&(*n0), &(*n1), &(*n2), &(*n3)); } - void set_vertices() - { - Ctds::set_vertices(); - } - - void set_neighbors() - { - Ctds::set_neighbors(); - } - void set_vertex(int i, Vertex_handle v) { Ctds::set_vertex(i, &(*v)); @@ -175,11 +144,6 @@ public: { Ctds::set_neighbor(i, &(*n)); } - -// bool is_valid(bool verbose = false, int level = 0) const -// { -// return Ctds::is_valid(verbose,level); -// } }; CGAL_END_NAMESPACE diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h index 19943bed27d..7fa5570e13e 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_data_structure_3.h @@ -37,8 +37,10 @@ #include #include -#include + +#include #include +#include #include #include @@ -49,8 +51,6 @@ #include #include -#include - CGAL_BEGIN_NAMESPACE template class Triangulation_ds_cell_iterator_3; diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_ds_cell_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_ds_cell_3.h index 3368d4590ba..36bd2a43178 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_ds_cell_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_ds_cell_3.h @@ -27,8 +27,8 @@ #ifndef CGAL_TRIANGULATION_DS_CELL_3_H #define CGAL_TRIANGULATION_DS_CELL_3_H -#include #include +#include CGAL_BEGIN_NAMESPACE diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_handles_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_handles_3.h index ea0f03f3889..ee8738889a0 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_handles_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_handles_3.h @@ -23,14 +23,13 @@ #ifndef CGAL_TRIANGULATION_HANDLES_3_H #define CGAL_TRIANGULATION_HANDLES_3_H +#include #include #include #include #include #include -#include - CGAL_BEGIN_NAMESPACE template < class Gt, class Tds > class Triangulation_cell_3; diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h index a88fe5583b9..25c548d2519 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_vertex_3.h @@ -23,112 +23,59 @@ #ifndef CGAL_TRIANGULATION_VERTEX_3_H #define CGAL_TRIANGULATION_VERTEX_3_H -#include -//#include -#include +#include + #include #include #include -#include - CGAL_BEGIN_NAMESPACE -template < class Gt, class Tds > -class Triangulation_cell_3; - -template < class Gt, class Tds > -class Triangulation_vertex_handle_3; - -template < class Gt, class Tds > -class Triangulation_cell_handle_3; +template < class Gt, class Tds > class Triangulation_cell_3; +template < class Gt, class Tds > class Triangulation_vertex_handle_3; +template < class Gt, class Tds > class Triangulation_cell_handle_3; template class Triangulation_vertex_3 : public Tds::Vertex { -public: - - typedef typename Gt::Point_3 Point; - typedef typename Tds::Vertex Vtds; typedef typename Tds::Cell Ctds; typedef Triangulation_cell_3 Cell; - typedef Triangulation_vertex_handle_3 Vertex_handle; typedef Triangulation_cell_handle_3 Cell_handle; - + +public: + + typedef typename Gt::Point_3 Point; + Triangulation_vertex_3() - : Vtds() - {} + : Vtds() {} Triangulation_vertex_3(const Point & p) - : Vtds(p) - {} - + : Vtds(p) {} + Triangulation_vertex_3(const Point & p, Cell_handle c) - : Vtds(p, &(*c)) - {} + : Vtds(p, &(*c)) {} Triangulation_vertex_3(Cell_handle c) - : Vtds(&(*c)) - {} + : Vtds(&(*c)) {} void set_cell(Cell_handle c) { Vtds::set_cell(&(*c)); } - - void set_point(const Point & p) - { - Vtds::set_point(p); - } - + Cell_handle cell() const { return (Cell *) Vtds::cell(); } - + Vertex_handle handle() { return Vertex_handle(this); } - - bool is_valid(bool verbose = false, int level = 0) const - { - return Vtds::is_valid(verbose,level); - } -// Vertex_circulator incident_vertices() -// { -// return Vertex_circulator(handle(), cell()); -// } - -// Vertex_circulator incident_vertices(const Cell_handle& c) -// { -// return Vertex_circulator(handle(), c); -// } - -// Cell_circulator incident_cells() -// { -// return Cell_circulator(handle(), cell()); -// } - -// Cell_circulator incident_cells(const Cell_handle& c) -// { -// return Cell_circulator(handle(), c); -// } - -// Edge_circulator incident_edges() -// { -// return Edge_circulator(handle(), cell()); -// } - -// Edge_circulator incident_edges(const Cell_handle& c) -// { -// return Edge_circulator(handle(), c); -// } - }; CGAL_END_NAMESPACE