From 392ff43801c42991c3daa455e4c5b4cd76e72014 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Tue, 22 May 2001 14:40:07 +0000 Subject: [PATCH] - Move Triangulation_hierarchy_vertex_base_3<> in its own file. --- Packages/Triangulation_3/changes.txt | 3 + .../include/CGAL/Triangulation_hierarchy_3.h | 30 +--------- .../Triangulation_hierarchy_vertex_base_3.h | 58 +++++++++++++++++++ 3 files changed, 62 insertions(+), 29 deletions(-) create mode 100644 Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_vertex_base_3.h diff --git a/Packages/Triangulation_3/changes.txt b/Packages/Triangulation_3/changes.txt index fb4141e9274..ef277f29cf1 100644 --- a/Packages/Triangulation_3/changes.txt +++ b/Packages/Triangulation_3/changes.txt @@ -1,3 +1,6 @@ +Version 1.53 (?? May 01) +- Put Triangulation_hierarchy_vertex_base_3 in its own file. + Version 1.52 (22 May 01) - Regular works again. - Fix memleak in TDS. diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h index 8d8d5f07551..f559b30e126 100644 --- a/Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_3.h @@ -25,38 +25,10 @@ #define CGAL_TRIANGULATION_HIERARCHY_3_H #include +#include CGAL_BEGIN_NAMESPACE -template < class Vbb> -class Triangulation_hierarchy_vertex_base_3 - : public Vbb -{ -public: - typedef Vbb V_Base; - typedef typename V_Base::Point Point; - - Triangulation_hierarchy_vertex_base_3() - : V_Base(), _up(0), _down(0) {} - - Triangulation_hierarchy_vertex_base_3(const Point & p, void* f) - : V_Base(p,f), _up(0), _down(0) {} - - Triangulation_hierarchy_vertex_base_3(const Point & p) - : V_Base(p), _up(0), _down(0) {} - -public: // for use in Triangulation_hierarchy only - // friend class Triangulation_hierarchy_3; - void* up() const {return _up;} - void* down() const {return _down;} - void set_up(void *u) {_up=u;} - void set_down(void *d) {if (this) _down=d;} - -private: - void* _up; // same vertex one level above - void* _down; // same vertex one level below -}; - // parameterization of the hierarchy //const float Triangulation_hierarchy_3__ratio = 30.0; const int Triangulation_hierarchy_3__ratio = 30; diff --git a/Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_vertex_base_3.h b/Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_vertex_base_3.h new file mode 100644 index 00000000000..0997063c3e2 --- /dev/null +++ b/Packages/Triangulation_3/include/CGAL/Triangulation_hierarchy_vertex_base_3.h @@ -0,0 +1,58 @@ +// ============================================================================ +// +// Copyright (c) 1998, 2001 The CGAL Consortium +// +// This software and related documentation is part of an INTERNAL release +// of the Computational Geometry Algorithms Library (CGAL). It is not +// intended for general use. +// +// ---------------------------------------------------------------------------- +// +// release : +// release_date : +// +// file : include/CGAL/Triangulation_hierarchy_vertex_base_3.h +// revision : $Revision$ +// revision_date : $Date$ +// package : Triangulation3 +// author(s) : Olivier Devillers, Sylvain Pion +// +// coordinator : INRIA Sophia-Antipolis () +// +// ============================================================================ + +#ifndef CGAL_TRIANGULATION_HIERARCHY_VERTEX_BASE_3_H +#define CGAL_TRIANGULATION_HIERARCHY_VERTEX_BASE_3_H + +CGAL_BEGIN_NAMESPACE + +template < class Vbb> +class Triangulation_hierarchy_vertex_base_3 + : public Vbb +{ +public: + typedef Vbb V_Base; + typedef typename V_Base::Point Point; + + Triangulation_hierarchy_vertex_base_3() + : V_Base(), _up(0), _down(0) {} + + Triangulation_hierarchy_vertex_base_3(const Point & p, void* f) + : V_Base(p,f), _up(0), _down(0) {} + + Triangulation_hierarchy_vertex_base_3(const Point & p) + : V_Base(p), _up(0), _down(0) {} + + void* up() const {return _up;} + void* down() const {return _down;} + void set_up(void *u) {_up=u;} + void set_down(void *d) {if (this) _down=d;} + +private: + void* _up; // same vertex one level above + void* _down; // same vertex one level below +}; + +CGAL_END_NAMESPACE + +#endif // CGAL_TRIANGULATION_HIERARCHY_VERTEX_BASE_3_H