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
00047 #ifdef CGAL_SIMPLE_KERNEL
00048 struct K : CGAL::Simple_cartesian<double> {};
00049 #else
00050 struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
00051 #endif // CGAL_SIMPLE_KERNEL
00052
00053
00054 const int INFINITE_VERTEX=-1;
00055 const int NEW_VERTEX=-2;
00056 const double HUGE_DOUBLE=1e300;
00057
00059 class InitialisedInt {
00060 private:
00061 int _val;
00062 public:
00063 inline InitialisedInt () {_val=NEW_VERTEX;};
00064 inline InitialisedInt& operator= (int value) {_val = value; return *this;};
00065 inline int val() const {return _val;};
00066 };
00067
00068
00069
00070
00071
00072
00073
00074
00075 #ifdef NOHIERARCHY
00076 typedef CGAL::Triangulation_vertex_base_with_info_2<InitialisedInt,K> Vb;
00077 typedef CGAL::Triangulation_face_base_2<K> Fb;
00078 typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
00079 typedef CGAL::Delaunay_triangulation_2<K,Tds> Triangulation;
00080 #else
00081 typedef CGAL::Triangulation_vertex_base_with_info_2<InitialisedInt,K> Vbb;
00082 typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
00083 typedef CGAL::Triangulation_face_base_2<K> Fb;
00084 typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
00085 typedef CGAL::Delaunay_triangulation_2<K,Tds> Dt;
00086 typedef CGAL::Triangulation_hierarchy_2<Dt> Triangulation;
00087 #endif
00088
00089 typedef Triangulation::Vertex_handle Vertex_handle;
00090 typedef Triangulation::Point Point;
00091 typedef Triangulation::Vertex_circulator Vertex_circulator;
00092 typedef Triangulation::Face_circulator Face_circulator;
00093 typedef Triangulation::Face_handle Face_handle;
00094
00095
00096
00097 FASTJET_END_NAMESPACE
00098
00099 #endif // __FASTJET_TRIANGULATION__
00100 #endif // DROP_CGAL