BWAPI
|
00001 // Copyright (c) 1999-2004 Utrecht University (The Netherlands), 00002 // ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), 00003 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg 00004 // (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), 00005 // and Tel-Aviv University (Israel). All rights reserved. 00006 // 00007 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or 00008 // modify it under the terms of the GNU Lesser General Public License as 00009 // published by the Free Software Foundation; version 2.1 of the License. 00010 // See the file LICENSE.LGPL distributed with CGAL. 00011 // 00012 // Licensees holding a valid commercial license may use this file in 00013 // accordance with the commercial license agreement provided with the software. 00014 // 00015 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00017 // 00018 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Homogeneous_kernel/include/CGAL/Homogeneous/Homogeneous_base.h $ 00019 // $Id: Homogeneous_base.h 45156 2008-08-26 13:40:26Z spion $ 00020 // 00021 // 00022 // Author(s) : Stefan Schirra, Sylvain Pion 00023 00024 #ifndef CGAL_HOMOGENEOUS_BASE_H 00025 #define CGAL_HOMOGENEOUS_BASE_H 00026 00027 #include <CGAL/basic.h> 00028 #include <CGAL/basic_classes.h> 00029 00030 #include <CGAL/Kernel/global_functions.h> 00031 00032 #include <CGAL/Homogeneous/Aff_transformationH2.h> 00033 #include <CGAL/Cartesian/Circle_2.h> 00034 00035 //#include <CGAL/Cartesian/Direction_2.h> 00036 #include <CGAL/Homogeneous/DirectionH2.h> 00037 #include <CGAL/Homogeneous/Iso_rectangleH2.h> 00038 #include <CGAL/Homogeneous/LineH2.h> 00039 #include <CGAL/Homogeneous/PointH2.h> 00040 #include <CGAL/Cartesian/Ray_2.h> 00041 #include <CGAL/Cartesian/Segment_2.h> 00042 #include <CGAL/Cartesian/Triangle_2.h> 00043 #include <CGAL/Homogeneous/VectorH2.h> 00044 #include <CGAL/Homogeneous/Data_accessorH2.h> 00045 #include <CGAL/ConicHPA2.h> 00046 00047 #include <CGAL/Homogeneous/Aff_transformationH3.h> 00048 #include <CGAL/Homogeneous/DirectionH3.h> 00049 #include <CGAL/Homogeneous/Iso_cuboidH3.h> 00050 #include <CGAL/Cartesian/Line_3.h> 00051 #include <CGAL/Homogeneous/PlaneH3.h> 00052 #include <CGAL/Homogeneous/PointH3.h> 00053 #include <CGAL/Homogeneous/RayH3.h> 00054 #include <CGAL/Cartesian/Segment_3.h> 00055 #include <CGAL/Homogeneous/SphereH3.h> 00056 #include <CGAL/Cartesian/Tetrahedron_3.h> 00057 #include <CGAL/Cartesian/Triangle_3.h> 00058 #include <CGAL/Cartesian/Circle_3.h> 00059 #include <CGAL/Homogeneous/VectorH3.h> 00060 00061 #include <CGAL/Homogeneous/basic_constructionsH2.h> 00062 #include <CGAL/Homogeneous/distance_predicatesH2.h> 00063 #include <CGAL/Homogeneous/predicates_on_directionsH2.h> 00064 #include <CGAL/Homogeneous/predicates_on_pointsH2.h> 00065 00066 #include <CGAL/Homogeneous/basic_constructionsH3.h> 00067 #include <CGAL/Homogeneous/distance_predicatesH3.h> 00068 #include <CGAL/Homogeneous/predicates_on_pointsH3.h> 00069 #include <CGAL/Homogeneous/predicates_on_pointsH2.h> 00070 00071 #include <CGAL/representation_tags.h> 00072 #include <CGAL/Homogeneous/function_objects.h> 00073 00074 #include <CGAL/Kernel_d/Cartesian_const_iterator_d.h> 00075 00076 CGAL_BEGIN_NAMESPACE 00077 00078 template <typename RT_, typename FT_, typename K_ > 00079 struct Homogeneous_base 00080 { 00081 typedef K_ Kernel; 00082 typedef RT_ RT; 00083 typedef FT_ FT; 00084 00085 typedef Homogeneous_tag Rep_tag; 00086 typedef Homogeneous_tag Kernel_tag; 00087 00088 typedef CGAL::Object Object_2; 00089 typedef CGAL::Object Object_3; 00090 00091 typedef typename Same_uncertainty_nt<bool, FT>::type 00092 Boolean; 00093 typedef typename Same_uncertainty_nt<CGAL::Sign, FT>::type 00094 Sign; 00095 typedef typename Same_uncertainty_nt<CGAL::Comparison_result, FT>::type 00096 Comparison_result; 00097 typedef typename Same_uncertainty_nt<CGAL::Orientation, FT>::type 00098 Orientation; 00099 typedef typename Same_uncertainty_nt<CGAL::Oriented_side, FT>::type 00100 Oriented_side; 00101 typedef typename Same_uncertainty_nt<CGAL::Bounded_side, FT>::type 00102 Bounded_side; 00103 typedef typename Same_uncertainty_nt<CGAL::Angle, FT>::type 00104 Angle; 00105 00106 template <typename T> 00107 struct Ambient_dimension { 00108 typedef typename T::Ambient_dimension type; 00109 }; 00110 00111 template <typename T> 00112 struct Feature_dimension { 00113 typedef typename T::Feature_dimension type; 00114 }; 00115 00116 typedef PointH2<Kernel> Point_2; 00117 typedef VectorH2<Kernel> Vector_2; 00118 typedef DirectionH2<Kernel> Direction_2; 00119 typedef SegmentC2<Kernel> Segment_2; 00120 typedef LineH2<Kernel> Line_2; 00121 typedef RayC2<Kernel> Ray_2; 00122 typedef CircleC2<Kernel> Circle_2; 00123 typedef TriangleC2<Kernel> Triangle_2; 00124 typedef Iso_rectangleH2<Kernel> Iso_rectangle_2; 00125 typedef Aff_transformationH2<Kernel> Aff_transformation_2; 00126 00127 typedef PointH3<Kernel> Point_3; 00128 typedef VectorH3<Kernel> Vector_3; 00129 typedef DirectionH3<Kernel> Direction_3; 00130 typedef SegmentC3<Kernel> Segment_3; 00131 typedef PlaneH3<Kernel> Plane_3; 00132 typedef LineC3<Kernel> Line_3; 00133 typedef RayH3<Kernel> Ray_3; 00134 typedef TriangleC3<Kernel> Triangle_3; 00135 typedef TetrahedronC3<Kernel> Tetrahedron_3; 00136 typedef Iso_cuboidH3<Kernel> Iso_cuboid_3; 00137 typedef SphereH3<Kernel> Sphere_3; 00138 typedef CircleC3<Kernel> Circle_3; 00139 typedef Aff_transformationH3<Kernel> Aff_transformation_3; 00140 00141 typedef Cartesian_const_iterator_d<const RT *> Cartesian_const_iterator_2; 00142 typedef Cartesian_const_iterator_d<const RT *> Cartesian_const_iterator_3; 00143 00144 typedef FT_ Cartesian_coordinate_type; 00145 typedef const RT_& Homogeneous_coordinate_type; 00146 // Undocumented stuff. 00147 typedef Data_accessorH2<Kernel> Data_accessor_2; 00148 typedef ConicHPA2<Point_2, Data_accessor_2> Conic_2; 00149 // Functors types and access functions. 00150 #define CGAL_Kernel_pred(Y,Z) typedef HomogeneousKernelFunctors::Y<Kernel> Y; \ 00151 Y Z() const { return Y(); } 00152 #define CGAL_Kernel_cons(Y,Z) CGAL_Kernel_pred(Y,Z) 00153 00154 #include <CGAL/Kernel/interface_macros.h> 00155 00156 }; 00157 00158 CGAL_END_NAMESPACE 00159 00160 #endif // CGAL_HOMOGENEOUS_BASE_H