00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef DROP_CGAL // in case we do not have the code for CGAL
00033 #ifndef __FASTJET_TRIANGULATION__
00034 #define __FASTJET_TRIANGULATION__
00035
00036
00037 #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
00038 #include <CGAL/Delaunay_triangulation_2.h>
00039 #include <CGAL/Triangulation_hierarchy_2.h>
00040 #include <CGAL/Triangulation_vertex_base_with_info_2.h>
00041 #include "fastjet/internal/base.hh"
00042
00043 FASTJET_BEGIN_NAMESPACE
00044
00045
00046
00047
00048
00049
00050
00051 #ifdef CGAL_SIMPLE_KERNEL
00052 struct K : CGAL::Simple_cartesian<double> {};
00053 #else
00054 struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
00055 #endif // CGAL_SIMPLE_KERNEL
00056
00057
00058 const int INFINITE_VERTEX=-1;
00059 const int NEW_VERTEX=-2;
00060 const double HUGE_DOUBLE=1e300;
00061
00062
00063
00064
00065
00066
00067 class InitialisedInt {
00068 private:
00069 int _val;
00070 public:
00071 inline InitialisedInt () {_val=NEW_VERTEX;};
00072 inline InitialisedInt& operator= (int value) {_val = value; return *this;};
00073 inline int val() const {return _val;};
00074 };
00075
00076
00077
00078
00079
00080
00081
00082
00083 #ifdef NOHIERARCHY
00084 typedef CGAL::Triangulation_vertex_base_with_info_2<InitialisedInt,K> Vb;
00085 typedef CGAL::Triangulation_face_base_2<K> Fb;
00086 typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
00087 typedef CGAL::Delaunay_triangulation_2<K,Tds> Triangulation;
00088 #else
00089 typedef CGAL::Triangulation_vertex_base_with_info_2<InitialisedInt,K> Vbb;
00090 typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
00091 typedef CGAL::Triangulation_face_base_2<K> Fb;
00092 typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
00093 typedef CGAL::Delaunay_triangulation_2<K,Tds> Dt;
00094 typedef CGAL::Triangulation_hierarchy_2<Dt> Triangulation;
00095 #endif
00096
00097 typedef Triangulation::Vertex_handle Vertex_handle;
00098 typedef Triangulation::Point Point;
00099 typedef Triangulation::Vertex_circulator Vertex_circulator;
00100 typedef Triangulation::Face_circulator Face_circulator;
00101 typedef Triangulation::Face_handle Face_handle;
00102
00103
00104
00105 FASTJET_END_NAMESPACE
00106
00107 #endif // __FASTJET_TRIANGULATION__
00108 #endif // DROP_CGAL