BWAPI
|
00001 // Copyright (c) 2003-2008 INRIA Sophia-Antipolis (France). 00002 // All rights reserved. 00003 // 00004 // This file is part of CGAL (www.cgal.org); you may redistribute it under 00005 // the terms of the Q Public License version 1.0. 00006 // See the file LICENSE.QPL distributed with CGAL. 00007 // 00008 // Licensees holding a valid commercial license may use this file in 00009 // accordance with the commercial license agreement provided with the software. 00010 // 00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 // 00014 // $URL: svn+ssh://pmachado@scm.gforge.inria.fr/svn/cgal/trunk/Circular_kernel_2/include/CGAL/global_functions_on_line_arcs_2.h $ 00015 // $Id: global_functions_on_line_arcs_2.h 45945 2008-10-01 12:25:23Z pmachado $ 00016 // 00017 // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 00018 // Sebastien Loriot, Julien Hazebrouck, Damien Leroy 00019 00020 // Partially supported by the IST Programme of the EU as a Shared-cost 00021 // RTD (FET Open) Project under Contract No IST-2000-26473 00022 // (ECG - Effective Computational Geometry for Curves and Surfaces) 00023 // and a STREP (FET Open) Project under Contract No IST-006413 00024 // (ACS -- Algorithms for Complex Shapes) 00025 00026 #ifndef CGAL_SPHERICAL_KERNEL_GLOBAL_FUNCTIONS_CIRCULAR_KERNEL_3_H 00027 #define CGAL_SPHERICAL_KERNEL_GLOBAL_FUNCTIONS_CIRCULAR_KERNEL_3_H 00028 00029 // global functions 00030 CGAL_BEGIN_NAMESPACE 00031 00032 template <class SK> 00033 Circular_arc_point_3<SK> 00034 x_extremal_point(const Circle_3<SK> & c, bool i) 00035 { 00036 return SphericalFunctors::x_extremal_point<SK>(c,i); 00037 } 00038 00039 template <class SK, class OutputIterator> 00040 OutputIterator 00041 x_extremal_points(const Circle_3<SK> & c, OutputIterator res) 00042 { 00043 return SphericalFunctors::x_extremal_points<SK>(c,res); 00044 } 00045 00046 template <class SK> 00047 Circular_arc_point_3<SK> 00048 y_extremal_point(const Circle_3<SK> & c, bool i) 00049 { 00050 return SphericalFunctors::y_extremal_point<SK>(c,i); 00051 } 00052 00053 template <class SK, class OutputIterator> 00054 OutputIterator 00055 y_extremal_points(const Circle_3<SK> & c, OutputIterator res) 00056 { 00057 return SphericalFunctors::y_extremal_points<SK>(c,res); 00058 } 00059 00060 template <class SK> 00061 Circular_arc_point_3<SK> 00062 z_extremal_point(const Circle_3<SK> & c, bool i) 00063 { 00064 return SphericalFunctors::z_extremal_point<SK>(c,i); 00065 } 00066 00067 template <class SK, class OutputIterator> 00068 OutputIterator 00069 z_extremal_points(const Circle_3<SK> & c, OutputIterator res) 00070 { 00071 return SphericalFunctors::z_extremal_point<SK>(c,res); 00072 } 00073 00074 template <class SK> 00075 Circular_arc_point_3<SK> 00076 x_extremal_point(const Sphere_3<SK> & c, bool i) 00077 { 00078 return SphericalFunctors::x_extremal_point<SK>(c,i); 00079 } 00080 00081 template <class SK, class OutputIterator> 00082 OutputIterator 00083 x_extremal_points(const Sphere_3<SK> & c, OutputIterator res) 00084 { 00085 return SphericalFunctors::x_extremal_points<SK>(c,res); 00086 } 00087 00088 template <class SK> 00089 Circular_arc_point_3<SK> 00090 y_extremal_point(const Sphere_3<SK> & c, bool i) 00091 { 00092 return SphericalFunctors::y_extremal_point<SK>(c,i); 00093 } 00094 00095 template <class SK, class OutputIterator> 00096 OutputIterator 00097 y_extremal_points(const Sphere_3<SK> & c, OutputIterator res) 00098 { 00099 return SphericalFunctors::y_extremal_points<SK>(c,res); 00100 } 00101 00102 template <class SK> 00103 Circular_arc_point_3<SK> 00104 z_extremal_point(const Sphere_3<SK> & c, bool i) 00105 { 00106 return SphericalFunctors::z_extremal_point<SK>(c,i); 00107 } 00108 00109 template <class SK, class OutputIterator> 00110 OutputIterator 00111 z_extremal_points(const Sphere_3<SK> & c, OutputIterator res) 00112 { 00113 return SphericalFunctors::z_extremal_points<SK>(c,res); 00114 } 00115 00116 template< class CK > 00117 inline 00118 CGAL::Comparison_result 00119 compare_x(const Circular_arc_point_3<CK> &p, const Circular_arc_point_3<CK> &q) 00120 { 00121 return CK().compare_x_3_object()(p, q); 00122 } 00123 00124 template< class CK > 00125 inline 00126 CGAL::Comparison_result 00127 compare_y(const Circular_arc_point_3<CK> &p, const Circular_arc_point_3<CK> &q) 00128 { 00129 return CK().compare_y_3_object()(p, q); 00130 } 00131 00132 template< class CK > 00133 inline 00134 CGAL::Comparison_result 00135 compare_z(const Circular_arc_point_3<CK> &p, const Circular_arc_point_3<CK> &q) 00136 { 00137 return CK().compare_z_3_object()(p, q); 00138 } 00139 00140 template< class CK > 00141 inline 00142 CGAL::Comparison_result 00143 compare_xy(const Circular_arc_point_3<CK> &p, const Circular_arc_point_3<CK> &q) 00144 { 00145 return CK().compare_xy_3_object()(p, q); 00146 } 00147 00148 template< class CK > 00149 inline 00150 CGAL::Comparison_result 00151 compare_xyz(const Circular_arc_point_3<CK> &p, const Circular_arc_point_3<CK> &q) 00152 { 00153 return CK().compare_xyz_3_object()(p, q); 00154 } 00155 00156 template <class SK> 00157 CGAL::Circle_type 00158 classify(const Circle_3<SK>& c,const Sphere_3<SK> & s) 00159 { 00160 return SphericalFunctors::classify_circle_3<SK>(c,s); 00161 } 00162 00163 template <class SK> 00164 bool 00165 is_theta_monotone(const Circular_arc_3<SK>& arc,const Sphere_3<SK> & s) 00166 { 00167 return SphericalFunctors::is_theta_monotone_3<SK>(arc,s); 00168 } 00169 00170 template <class SK> 00171 CGAL::Comparison_result 00172 compare_theta(const Circular_arc_point_3<SK>& pt1,const Circular_arc_point_3<SK>& pt2,const Sphere_3<SK>& sphere) 00173 { 00174 return SphericalFunctors::compare_theta_of_pts<SK>(pt1,pt2,sphere); 00175 } 00176 00177 template <class SK> 00178 CGAL::Comparison_result 00179 compare_theta(const Circular_arc_point_3<SK>& pt,const Vector_3<SK>& v,const Sphere_3<SK>& sphere) 00180 { 00181 return SphericalFunctors::compare_theta_pt_vector<SK>(pt,v,sphere); 00182 } 00183 00184 template <class SK> 00185 CGAL::Comparison_result 00186 compare_theta(const Vector_3<SK>& v,const Circular_arc_point_3<SK>& pt,const Sphere_3<SK>& sphere) 00187 { 00188 return CGAL::opposite(SphericalFunctors::compare_theta_pt_vector<SK>(pt,v,sphere)); 00189 } 00190 00191 00192 template <class SK> 00193 CGAL::Comparison_result 00194 compare_theta(const Vector_3<SK>&m1,const Vector_3<SK>&m2) 00195 { return SphericalFunctors::compare_theta_vectors<SK>(m1,m2); } 00196 00197 template <class SK> 00198 CGAL::Comparison_result 00199 compare_theta_z(const Circular_arc_point_3<SK>& pt1,const Circular_arc_point_3<SK>& pt2,const Sphere_3<SK>& sphere) 00200 { 00201 return SphericalFunctors::compare_theta_z<SK>(pt1,pt2,sphere); 00202 } 00203 00204 00205 template <class SK> 00206 typename SK::Circular_arc_point_3 00207 theta_extremal_point(const Circle_3<SK>& circle,const Sphere_3<SK>& sphere,bool is_smallest) 00208 { 00209 return SphericalFunctors::theta_extremal_point<SK>(circle,sphere,is_smallest); 00210 } 00211 00212 template <class SK,class OutputIterator> 00213 OutputIterator 00214 theta_extremal_points(const Circle_3<SK>& circle,const Sphere_3<SK>& sphere,OutputIterator out_it) 00215 { 00216 return SphericalFunctors::theta_extremal_points<SK>(circle,sphere,out_it); 00217 } 00218 00219 CGAL_END_NAMESPACE 00220 00221 #endif // CGAL_SPHERICAL_KERNEL_GLOBAL_FUNCTIONS_CIRCULAR_KERNEL_3_H