BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Kernel/global_functions_internal_3.h
Go to the documentation of this file.
00001 // Copyright (c) 2003-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/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h $
00019 // $Id: global_functions_internal_3.h 50420 2009-07-07 10:33:38Z afabri $
00020 // 
00021 //
00022 // Author(s)     : Sylvain Pion
00023  
00024 #ifndef CGAL_KERNEL_GLOBAL_FUNCTIONS_INTERNAL_3_H
00025 #define CGAL_KERNEL_GLOBAL_FUNCTIONS_INTERNAL_3_H
00026 
00027 // Generic functions calling the kernel functor.
00028 // See comments in CGAL/Kernel/global_functions_internal_3.h.
00029 
00030 CGAL_BEGIN_NAMESPACE
00031 
00032 namespace CGALi {
00033 
00034 template <typename K>
00035 inline
00036 typename K::Angle
00037 angle(const typename K::Point_3 &p,
00038       const typename K::Point_3 &q,
00039       const typename K::Point_3 &r, const K &k)
00040 {
00041   return k.angle_3_object()(p, q, r);
00042 }
00043 
00044 template < class K >
00045 inline
00046 typename K::Boolean
00047 are_ordered_along_line(const typename K::Point_3 &p,
00048                        const typename K::Point_3 &q,
00049                        const typename K::Point_3 &r, const K& k)
00050 {
00051   return k.are_ordered_along_line_3_object()(p, q, r);
00052 }
00053 
00054 template < class K >
00055 inline
00056 typename K::Boolean
00057 are_strictly_ordered_along_line(const typename K::Point_3 &p,
00058                                 const typename K::Point_3 &q,
00059                                 const typename K::Point_3 &r,
00060                                 const K& k)
00061 {
00062   return k.are_strictly_ordered_along_line_3_object()(p, q, r);
00063 }
00064 
00065 template < class K >
00066 inline
00067 typename K::Point_3
00068 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1,
00069            const typename K::Point_3 &p2, const K& k)
00070 {
00071   return k.construct_barycenter_3_object()(p1, w1, p2);
00072 }
00073   
00074 template < class K >
00075 inline
00076 typename K::Point_3
00077 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1,
00078            const typename K::Point_3 &p2, const typename K::FT& w2, const K& k)
00079 {
00080   return k.construct_barycenter_3_object()(p1, w1, p2, w2);
00081 }
00082   
00083 template < class K >
00084 inline
00085 typename K::Point_3
00086 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1,
00087            const typename K::Point_3 &p2, const typename K::FT& w2,
00088            const typename K::Point_3 &p3, const K& k)
00089 {        
00090   return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3);
00091 }
00092   
00093 template < class K >
00094 inline
00095 typename K::Point_3
00096 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1,
00097            const typename K::Point_3 &p2, const typename K::FT& w2,
00098            const typename K::Point_3 &p3, const typename K::FT& w3, const K& k)
00099 {        
00100   return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3, w3);
00101 }        
00102 
00103 template < class K >
00104 inline
00105 typename K::Point_3
00106 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1,
00107            const typename K::Point_3 &p2, const typename K::FT& w2,
00108            const typename K::Point_3 &p3, const typename K::FT& w3,
00109            const typename K::Point_3 &p4, const K& k)
00110 {
00111   return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3, w3, p4);
00112 }
00113 
00114 template < class K >
00115 inline
00116 typename K::Point_3
00117 barycenter(const typename K::Point_3 &p1, const typename K::FT& w1,
00118            const typename K::Point_3 &p2, const typename K::FT& w2,
00119            const typename K::Point_3 &p3, const typename K::FT& w3,
00120            const typename K::Point_3 &p4, const typename K::FT& w4, const K& k)
00121 {
00122   return k.construct_barycenter_3_object()(p1, w1, p2, w2, p3, w3, p4, w4);
00123 }
00124 
00125 template <typename K>
00126 inline
00127 typename K::Plane_3
00128 bisector(const typename K::Point_3 &p,
00129          const typename K::Point_3 &q, const K &k)
00130 {
00131   return k.construct_bisector_3_object()(p, q);
00132 }
00133 
00134 template <typename K>
00135 inline
00136 typename K::Plane_3
00137 bisector(const typename K::Plane_3 &h1,
00138          const typename K::Plane_3 &h2, const K &k)
00139 {
00140   return k.construct_bisector_3_object()(h1, h2);
00141 }
00142 
00143 template < class K >
00144 inline
00145 typename K::Point_3
00146 centroid(const typename K::Point_3 &p,
00147          const typename K::Point_3 &q,
00148          const typename K::Point_3 &r,
00149          const typename K::Point_3 &s, const K &k)
00150 {
00151   return k.construct_centroid_3_object()(p, q, r, s);
00152 }
00153 
00154 template < class K >
00155 inline
00156 typename K::Point_3
00157 centroid(const typename K::Point_3 &p,
00158          const typename K::Point_3 &q,
00159          const typename K::Point_3 &r, const K &k)
00160 {
00161   return k.construct_centroid_3_object()(p, q, r);
00162 }
00163 
00164 template < class K >
00165 inline
00166 typename K::Point_3
00167 centroid(const typename K::Tetrahedron_3 &t, const K &k)
00168 {
00169   return k.construct_centroid_3_object()(t);
00170 }
00171 
00172 template < class K >
00173 inline
00174 typename K::Point_3
00175 centroid(const typename K::Triangle_3 &t, const K &k)
00176 {
00177   return k.construct_centroid_3_object()(t);
00178 }
00179 
00180 template < class K >
00181 inline
00182 typename K::Point_3
00183 circumcenter(const typename K::Point_3 &p,
00184              const typename K::Point_3 &q, const K &k)
00185 {
00186   return k.construct_circumcenter_3_object()(p, q);
00187 }
00188 
00189 template < class K >
00190 inline
00191 typename K::Point_3
00192 circumcenter(const typename K::Point_3 &p,
00193              const typename K::Point_3 &q,
00194              const typename K::Point_3 &r, const K &k)
00195 {
00196   return k.construct_circumcenter_3_object()(p, q, r);
00197 }
00198 
00199 template < class K >
00200 inline
00201 typename K::Point_3
00202 circumcenter(const typename K::Point_3 &p,
00203              const typename K::Point_3 &q,
00204              const typename K::Point_3 &r,
00205              const typename K::Point_3 &s, const K &k)
00206 {
00207   return k.construct_circumcenter_3_object()(p, q, r, s);
00208 }
00209 
00210 template < class K >
00211 inline
00212 typename K::Point_3
00213 circumcenter(const typename K::Tetrahedron_3 &t, const K& k)
00214 {
00215   return k.construct_circumcenter_3_object()(t);
00216 }
00217 
00218 template < class K >
00219 inline
00220 typename K::Point_3
00221 circumcenter(const typename K::Triangle_3 &t, const K& k)
00222 {
00223   return k.construct_circumcenter_3_object()(t);
00224 }
00225 
00226 template < class K >
00227 inline
00228 typename K::Boolean
00229 collinear(const typename K::Point_3 &p,
00230           const typename K::Point_3 &q,
00231           const typename K::Point_3 &r,
00232           const K& k)
00233 {
00234   return k.collinear_3_object()(p, q, r);
00235 }
00236 
00237 template < class K >
00238 inline
00239 typename K::Boolean
00240 collinear_are_ordered_along_line(
00241           const typename K::Point_3 &p,
00242           const typename K::Point_3 &q,
00243           const typename K::Point_3 &r,
00244           const K& k)
00245 {
00246   return k.collinear_are_ordered_along_line_3_object()(p, q, r);
00247 }
00248 
00249 template < class K >
00250 inline
00251 typename K::Boolean
00252 collinear_are_strictly_ordered_along_line(
00253           const typename K::Point_3 &p,
00254           const typename K::Point_3 &q,
00255           const typename K::Point_3 &r,
00256           const K& k)
00257 {
00258   return k.collinear_are_strictly_ordered_along_line_3_object()(p, q, r);
00259 }
00260 
00261 template < class K >
00262 inline
00263 typename K::Comparison_result
00264 compare_distance_to_point(const typename K::Point_3 &p,
00265                           const typename K::Point_3 &q,
00266                           const typename K::Point_3 &r,
00267                           const K& k)
00268 {
00269   return k.compare_distance_3_object()(p, q, r);
00270 }
00271 
00272 template < class K >
00273 inline
00274 typename K::Comparison_result
00275 compare_squared_distance(const typename K::Point_3 &p,
00276                          const typename K::Point_3 &q,
00277                          const typename K::FT &d2,
00278                          const K& k)
00279 {
00280   return k.compare_squared_distance_3_object()(p, q, d2);
00281 }
00282 
00283 template < class K >
00284 inline
00285 typename K::Comparison_result
00286 compare_squared_radius(const typename K::Point_3 &p,
00287                        const typename K::Point_3 &q,
00288                        const typename K::FT &sr,
00289                        const K& k)
00290 {
00291   return k.compare_squared_radius_3_object()(p, q, sr);
00292 }
00293 
00294 template < class K >
00295 inline
00296 typename K::Comparison_result
00297 compare_squared_radius(const typename K::Point_3 &p,
00298                        const typename K::Point_3 &q,
00299                        const typename K::Point_3 &r,
00300                        const typename K::FT &sr,
00301                        const K& k)
00302 {
00303   return k.compare_squared_radius_3_object()(p, q, r, sr);
00304 }
00305 
00306 template < class K >
00307 inline
00308 typename K::Comparison_result
00309 compare_squared_radius(const typename K::Point_3 &p,
00310                        const typename K::Point_3 &q,
00311                        const typename K::Point_3 &r,
00312                        const typename K::Point_3 &s,
00313                        const typename K::FT &sr,
00314                        const K& k)
00315 {
00316   return k.compare_squared_radius_3_object()(p, q, r, s, sr);
00317 }
00318 
00319 template < class K >
00320 inline
00321 typename K::Comparison_result
00322 compare_lexicographically_xyz(const typename K::Point_3 &p,
00323                               const typename K::Point_3 &q,
00324                               const K& k)
00325 {
00326   return k.compare_xyz_3_object()(p, q);
00327 }
00328 
00329 template < class K >
00330 inline
00331 typename K::Comparison_result
00332 compare_signed_distance_to_plane(const typename K::Plane_3 &h,
00333                                  const typename K::Point_3 &p,
00334                                  const typename K::Point_3 &q,
00335                                  const K &k)
00336 { 
00337   if (k.less_signed_distance_to_plane_3_object()(h, p, q)) return SMALLER;
00338   if (k.less_signed_distance_to_plane_3_object()(h, q, p)) return LARGER;
00339   return EQUAL;
00340 }
00341 
00342 template < class K >
00343 inline
00344 typename K::Comparison_result
00345 compare_signed_distance_to_plane(const typename K::Point_3 &hp,
00346                                  const typename K::Point_3 &hq,
00347                                  const typename K::Point_3 &hr,
00348                                  const typename K::Point_3 &p,
00349                                  const typename K::Point_3 &q,
00350                                  const K &k)
00351 { 
00352   if (k.less_signed_distance_to_plane_3_object()(hp, hq, hr, p, q))
00353     return SMALLER;
00354   if (k.less_signed_distance_to_plane_3_object()(hp, hq, hr, q, p))
00355     return LARGER;
00356   return EQUAL;
00357 }
00358 
00359 template < class K >
00360 inline
00361 typename K::Comparison_result
00362 compare_x(const typename K::Point_3 &p,
00363           const typename K::Point_3 &q,
00364           const K &k)
00365 { 
00366   return k.compare_x_3_object()(p, q);
00367 }
00368 
00369 template < class K >
00370 inline
00371 typename K::Comparison_result
00372 compare_y(const typename K::Point_3 &p,
00373           const typename K::Point_3 &q,
00374           const K &k)
00375 { 
00376   return k.compare_y_3_object()(p, q);
00377 }
00378 
00379 template < class K >
00380 inline
00381 typename K::Comparison_result
00382 compare_z(const typename K::Point_3 &p,
00383           const typename K::Point_3 &q,
00384           const K &k)
00385 { 
00386   return k.compare_z_3_object()(p, q);
00387 }
00388 
00389 template < class K >
00390 inline
00391 typename K::Comparison_result
00392 compare_xyz(const typename K::Point_3 &p,
00393             const typename K::Point_3 &q,
00394             const K &k)
00395 { 
00396   return k.compare_xyz_3_object()(p, q);
00397 }
00398 
00399 template < class K >
00400 inline
00401 typename K::Boolean
00402 coplanar(const typename K::Point_3 &p,
00403          const typename K::Point_3 &q,
00404          const typename K::Point_3 &r,
00405          const typename K::Point_3 &s, const K& k)
00406 {
00407   return k.coplanar_3_object()(p, q, r, s);
00408 }
00409 
00410 template < class K >
00411 inline
00412 typename K::Orientation
00413 coplanar_orientation(const typename K::Point_3 &p,
00414                      const typename K::Point_3 &q,
00415                      const typename K::Point_3 &r,
00416                      const typename K::Point_3 &s, const K& k)
00417 {
00418   return k.coplanar_orientation_3_object()(p, q, r, s);
00419 }
00420 
00421 template < class K >
00422 inline
00423 typename K::Orientation
00424 coplanar_orientation(const typename K::Point_3 &p,
00425                      const typename K::Point_3 &q,
00426                      const typename K::Point_3 &r, const K& k)
00427 {
00428   return k.coplanar_orientation_3_object()(p, q, r);
00429 }
00430 
00431 template < class K >
00432 inline
00433 typename K::Bounded_side
00434 coplanar_side_of_bounded_circle(const typename K::Point_3 &p,
00435                                 const typename K::Point_3 &q,
00436                                 const typename K::Point_3 &r,
00437                                 const typename K::Point_3 &t,
00438                                 const K& k)
00439 {
00440   return k.coplanar_side_of_bounded_circle_3_object()(p, q, r, t);
00441 }
00442 
00443 template < class K >
00444 inline
00445 typename K::Vector_3
00446 cross_product(const typename K::Vector_3 &v,
00447               const typename K::Vector_3 &w, const K& k)
00448 {
00449   return k.construct_cross_product_vector_3_object()(v, w);
00450 }
00451 
00452 template < class K >
00453 inline
00454 typename K::FT
00455 determinant(const typename K::Vector_3 &v0,
00456             const typename K::Vector_3 &v1,
00457             const typename K::Vector_3 &v2, const K &k)
00458 {
00459   return k.compute_determinant_3_object()(v0, v1, v2);
00460 }
00461 
00462 template < class K >
00463 inline
00464 typename K::Line_3
00465 equidistant_line(const typename K::Point_3 &p,
00466                  const typename K::Point_3 &q,
00467                  const typename K::Point_3 &r, const K& k)
00468 {
00469   return k.construct_equidistant_line_3_object()(p, q, r);
00470 }
00471 
00472 template < class K >
00473 inline
00474 typename K::Boolean
00475 has_smaller_distance_to_point(const typename K::Point_3 &p,
00476                               const typename K::Point_3 &q,
00477                               const typename K::Point_3 &r,
00478                               const K &k)
00479 {
00480   return k.less_distance_to_point_3_object()(p, q, r);
00481 }
00482 
00483 template < class K >
00484 inline
00485 typename K::Boolean
00486 has_larger_distance_to_point(const typename K::Point_3 &p,
00487                              const typename K::Point_3 &q,
00488                              const typename K::Point_3 &r,
00489                              const K &k)
00490 {
00491   return k.compare_distance_3_object()(p, q, r) == LARGER;
00492 }
00493 
00494 template < class K >
00495 inline
00496 typename K::Boolean
00497 has_larger_signed_distance_to_plane(const typename K::Plane_3 &h,
00498                                     const typename K::Point_3 &p,
00499                                     const typename K::Point_3 &q,
00500                                     const K &k)
00501 { 
00502   return k.less_signed_distance_to_plane_3_object()(h, q, p);
00503 }
00504 
00505 template < class K >
00506 inline
00507 typename K::Boolean
00508 has_larger_signed_distance_to_plane(const typename K::Point_3 &hp,
00509                                     const typename K::Point_3 &hq,
00510                                     const typename K::Point_3 &hr,
00511                                     const typename K::Point_3 &p,
00512                                     const typename K::Point_3 &q,
00513                                     const K &k)
00514 { 
00515   return k.less_signed_distance_to_plane_3_object()(hp, hq, hr, q, p);
00516 }
00517 
00518 template < class K >
00519 inline
00520 typename K::Boolean
00521 has_smaller_signed_distance_to_plane(const typename K::Plane_3 &h,
00522                                      const typename K::Point_3 &p,
00523                                      const typename K::Point_3 &q,
00524                                      const K &k)
00525 { 
00526   return k.less_signed_distance_to_plane_3_object()(h, p, q);
00527 }
00528 
00529 template < class K >
00530 inline
00531 typename K::Boolean
00532 has_smaller_signed_distance_to_plane(const typename K::Point_3 &hp,
00533                                      const typename K::Point_3 &hq,
00534                                      const typename K::Point_3 &hr,
00535                                      const typename K::Point_3 &p,
00536                                      const typename K::Point_3 &q,
00537                                      const K &k)
00538 { 
00539   return k.less_signed_distance_to_plane_3_object()(hp, hq, hr, p, q);
00540 }
00541 
00542 template < class K >
00543 inline
00544 typename K::Boolean
00545 less_x(const typename K::Point_3 &p,
00546        const typename K::Point_3 &q,
00547        const K &k)
00548 { 
00549   return k.less_x_3_object()(p, q);
00550 }
00551 
00552 template < class K >
00553 inline
00554 typename K::Boolean
00555 less_y(const typename K::Point_3 &p,
00556        const typename K::Point_3 &q,
00557        const K &k)
00558 { 
00559   return k.less_y_3_object()(p, q);
00560 }
00561 
00562 template < class K >
00563 inline
00564 typename K::Boolean
00565 less_z(const typename K::Point_3 &p,
00566        const typename K::Point_3 &q,
00567        const K &k)
00568 { 
00569   return k.less_z_3_object()(p, q);
00570 }
00571 
00572 template < class K >
00573 inline
00574 typename K::Boolean
00575 lexicographically_xyz_smaller(const typename K::Point_3 &p,
00576                               const typename K::Point_3 &q,
00577                               const K &k)
00578 {
00579   return k.less_xyz_3_object()(p, q);
00580 }
00581 
00582 template < class K >
00583 inline
00584 typename K::Point_3
00585 midpoint(const typename K::Point_3 &p,
00586          const typename K::Point_3 &q, const K &k)
00587 {
00588   return k.construct_midpoint_3_object()(p, q);
00589 }
00590 
00591 template < class K >
00592 inline
00593 typename K::Point_3
00594 max_vertex(const typename K::Iso_cuboid_3 &ic, const K &k)
00595 {
00596   return k.construct_max_vertex_3_object()(ic);
00597 }
00598 
00599 template < class K >
00600 inline
00601 typename K::Point_3
00602 min_vertex(const typename K::Iso_cuboid_3 &ic, const K &k)
00603 {
00604   return k.construct_min_vertex_3_object()(ic);
00605 }
00606 
00607 template < class K >
00608 inline
00609 typename K::Vector_3
00610 normal(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k)
00611 {
00612   return k.construct_normal_3_object()(p, q, r);
00613 }
00614 template < class K >
00615 inline
00616 typename K::Vector_3
00617 unit_normal(const typename K::Point_3 &p, const typename K::Point_3 &q, const typename K::Point_3 &r, const K &k)
00618 {
00619   return k.construct_unit_normal_3_object()(p, q, r);
00620 }
00621 
00622 template <class K >
00623 inline
00624 typename K::Orientation
00625 orientation(const typename K::Point_3 &p,
00626             const typename K::Point_3 &q,
00627             const typename K::Point_3 &r,
00628             const typename K::Point_3 &s, const K &k)
00629 {
00630   return k.orientation_3_object()(p, q, r, s);
00631 }
00632 
00633 template <class K >
00634 inline
00635 typename K::Orientation
00636 orientation(const typename K::Vector_3 &u,
00637             const typename K::Vector_3 &v,
00638             const typename K::Vector_3 &w, const K &k)
00639 {
00640   return k.orientation_3_object()(u, v, w);
00641 }
00642 
00643 template < class K >
00644 inline
00645 typename K::Vector_3
00646 orthogonal_vector(const typename K::Point_3 &p,
00647                   const typename K::Point_3 &q,
00648                   const typename K::Point_3 &r, const K &k)
00649 {
00650   return k.construct_orthogonal_vector_3_object()(p, q, r);
00651 }
00652 
00653 template < class K >
00654 inline
00655 typename K::Vector_3
00656 orthogonal_vector(const typename K::Plane_3 &p, const K &k)
00657 {
00658   return k.construct_orthogonal_vector_3_object()(p);
00659 }
00660 
00661 template <typename K>
00662 inline
00663 typename K::Boolean
00664 parallel(const typename K::Line_3 &l1,
00665          const typename K::Line_3 &l2, const K &k)
00666 {
00667   return k.are_parallel_3_object()(l1, l2);
00668 }
00669 
00670 template <typename K>
00671 inline
00672 typename K::Boolean
00673 parallel(const typename K::Plane_3 &h1,
00674          const typename K::Plane_3 &h2, const K &k)
00675 {
00676   return k.are_parallel_3_object()(h1, h2);
00677 }
00678 
00679 template <typename K>
00680 inline
00681 typename K::Boolean
00682 parallel(const typename K::Ray_3 &r1,
00683          const typename K::Ray_3 &r2, const K &k)
00684 {
00685   return k.are_parallel_3_object()(r1, r2);
00686 }
00687 
00688 template <typename K>
00689 inline
00690 typename K::Boolean
00691 parallel(const typename K::Segment_3 &s1,
00692          const typename K::Segment_3 &s2, const K &k)
00693 {
00694   return k.are_parallel_3_object()(s1, s2);
00695 }
00696 
00697 template <class K >
00698 inline
00699 typename K::Bounded_side
00700 side_of_bounded_sphere(const typename K::Point_3 &p,
00701                        const typename K::Point_3 &q,
00702                        const typename K::Point_3 &test, const K &k)
00703 {
00704   return k.side_of_bounded_sphere_3_object()(p, q, test);
00705 }
00706 
00707 template <class K >
00708 inline
00709 typename K::Bounded_side
00710 side_of_bounded_sphere(const typename K::Point_3 &p,
00711                        const typename K::Point_3 &q,
00712                        const typename K::Point_3 &r,
00713                        const typename K::Point_3 &test, const K &k)
00714 {
00715   return k.side_of_bounded_sphere_3_object()(p, q, r, test);
00716 }
00717 
00718 template <class K >
00719 inline
00720 typename K::Bounded_side
00721 side_of_bounded_sphere(const typename K::Point_3 &p,
00722                        const typename K::Point_3 &q,
00723                        const typename K::Point_3 &r,
00724                        const typename K::Point_3 &s,
00725                        const typename K::Point_3 &test, const K &k)
00726 {
00727   return k.side_of_bounded_sphere_3_object()(p, q, r, s, test);
00728 }
00729 
00730 template <class K >
00731 inline
00732 typename K::Oriented_side
00733 side_of_oriented_sphere(const typename K::Point_3 &p,
00734                         const typename K::Point_3 &q,
00735                         const typename K::Point_3 &r,
00736                         const typename K::Point_3 &s,
00737                         const typename K::Point_3 &test, const K &k)
00738 {
00739   return k.side_of_oriented_sphere_3_object()(p, q, r, s, test);
00740 }
00741 
00742 template <typename K>
00743 inline
00744 typename K::FT
00745 squared_area(const typename K::Point_3 &p,
00746              const typename K::Point_3 &q,
00747              const typename K::Point_3 &r, const K &k)
00748 {
00749   return k.compute_squared_area_3_object()(p, q, r);
00750 }
00751 
00752 template < class K >
00753 inline
00754 typename K::FT
00755 squared_radius(const typename K::Point_3 &p,
00756                const typename K::Point_3 &q,
00757                const typename K::Point_3 &r,
00758                const typename K::Point_3 &s, const K &k)
00759 {
00760   return k.compute_squared_radius_3_object()(p, q, r, s);
00761 }
00762 
00763 template < class K >
00764 inline
00765 typename K::FT
00766 squared_radius(const typename K::Point_3 &p,
00767                const typename K::Point_3 &q,
00768                const typename K::Point_3 &r, const K &k)
00769 {
00770   return k.compute_squared_radius_3_object()(p, q, r);
00771 }
00772 
00773 template < class K >
00774 inline
00775 typename K::FT
00776 squared_radius(const typename K::Point_3 &p,
00777                const typename K::Point_3 &q, const K &k)
00778 {
00779   return k.compute_squared_radius_3_object()(p, q);
00780 }
00781 
00782 template < class K >
00783 inline
00784 typename K::FT
00785 squared_radius(const typename K::Point_3 &p, const K &k)
00786 {
00787   return k.compute_squared_radius_3_object()(p);
00788 }
00789 
00790 template < class K >
00791 inline
00792 typename K::FT
00793 volume(const typename K::Point_3 &p,
00794        const typename K::Point_3 &q,
00795        const typename K::Point_3 &r,
00796        const typename K::Point_3 &s, const K &k)
00797 {
00798   return k.compute_volume_3_object()(p, q, r, s);
00799 }
00800 
00801 template < class K >
00802 inline
00803 typename K::Boolean
00804 x_equal(const typename K::Point_3 &p,
00805         const typename K::Point_3 &q, const K &k)
00806 {
00807   return k.equal_x_3_object()(p, q);
00808 }
00809 
00810 template < class K >
00811 inline
00812 typename K::Boolean
00813 y_equal(const typename K::Point_3 &p,
00814         const typename K::Point_3 &q, const K &k)
00815 {
00816   return k.equal_y_3_object()(p, q);
00817 }
00818 
00819 template < class K >
00820 inline
00821 typename K::Boolean
00822 z_equal(const typename K::Point_3 &p,
00823         const typename K::Point_3 &q, const K &k)
00824 {
00825   return k.equal_z_3_object()(p, q);
00826 }
00827 
00828 
00829 // The following functions only call some of the previous ones.
00830 
00831 template <typename K>
00832 inline
00833 typename K::Boolean
00834 are_negative_oriented(const typename K::Point_3 &p,
00835                       const typename K::Point_3 &q,
00836                       const typename K::Point_3 &r,
00837                       const typename K::Point_3 &s, const K &k)
00838 {
00839   return CGALi::orientation(p, q, r, s, k) == NEGATIVE;
00840 }
00841 
00842 template <typename K>
00843 inline
00844 typename K::Boolean
00845 are_positive_oriented(const typename K::Point_3 &p,
00846                       const typename K::Point_3 &q,
00847                       const typename K::Point_3 &r,
00848                       const typename K::Point_3 &s, const K &k)
00849 {
00850   return CGALi::orientation(p, q, r, s, k) == POSITIVE;
00851 }
00852 
00853 template < class K >
00854 inline
00855 typename K::Boolean
00856 lexicographically_xyz_smaller_or_equal(const typename K::Point_3 &p,
00857                                        const typename K::Point_3 &q,
00858                                        const K&k)
00859 {
00860   return CGALi::compare_lexicographically_xyz(p, q, k) != LARGER;
00861 }
00862 
00863 } // namespace CGALi
00864 
00865 CGAL_END_NAMESPACE
00866 
00867 #endif  // CGAL_KERNEL_GLOBAL_FUNCTIONS_INTERNAL_3_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines