BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h
Go to the documentation of this file.
00001 // Copyright (c) 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://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Circular_kernel_3/include/CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h $
00015 // $Id: internal_function_compare_spherical_kernel.h 44381 2008-07-24 09:26:28Z pmachado $
00016 //
00017 // Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado, 
00018 //             Julien Hazebrouck, Damien Leroy
00019 
00020 // Partially supported by the IST Programme of the EU as a 
00021 // STREP (FET Open) Project under Contract No  IST-006413 
00022 // (ACS -- Algorithms for Complex Shapes)
00023 
00024 #ifndef CGAL_SPHERICAL_KERNEL_PREDICATES_COMPARE_3_H
00025 #define CGAL_SPHERICAL_KERNEL_PREDICATES_COMPARE_3_H
00026 
00027 namespace CGAL {
00028   namespace SphericalFunctors {
00029 
00030   // we can optimize those functions by comparing 
00031   // the references before doing the comparison
00032   // as in CK
00033   template < class SK >
00034   inline
00035   Comparison_result 
00036   compare_x(const typename SK::Circular_arc_point_3 &p0,
00037             const typename SK::Circular_arc_point_3 &p1)
00038   {
00039     typedef typename SK::Algebraic_kernel   Algebraic_kernel;
00040     return Algebraic_kernel().compare_x_object()(p0.coordinates(), p1.coordinates());
00041   }
00042 
00043   template < class SK >
00044   inline
00045   Comparison_result 
00046   compare_y(const typename SK::Circular_arc_point_3 &p0,
00047             const typename SK::Circular_arc_point_3 &p1)
00048   {
00049     typedef typename SK::Algebraic_kernel   Algebraic_kernel;
00050     return Algebraic_kernel().compare_y_object()(p0.coordinates(), p1.coordinates());
00051   }
00052 
00053   template < class SK >
00054   inline
00055   Comparison_result 
00056   compare_z(const typename SK::Circular_arc_point_3 &p0,
00057             const typename SK::Circular_arc_point_3 &p1)
00058   {
00059     typedef typename SK::Algebraic_kernel   Algebraic_kernel;
00060     return Algebraic_kernel().compare_z_object()(p0.coordinates(), p1.coordinates());
00061   }
00062 
00063   template < class SK >
00064   inline
00065   Comparison_result 
00066   compare_xy(const typename SK::Circular_arc_point_3 &p0,
00067              const typename SK::Circular_arc_point_3 &p1)
00068   {
00069     typedef typename SK::Algebraic_kernel   Algebraic_kernel;
00070     return Algebraic_kernel().compare_xy_object()(p0.coordinates(), p1.coordinates());
00071   }
00072 
00073   template < class SK >
00074   inline
00075   Comparison_result 
00076   compare_xyz(const typename SK::Circular_arc_point_3 &p0,
00077               const typename SK::Circular_arc_point_3 &p1)
00078   {
00079     typedef typename SK::Algebraic_kernel   Algebraic_kernel;
00080     return Algebraic_kernel().compare_xyz_object()(p0.coordinates(), p1.coordinates());
00081   }
00082 
00083   }//SphericalFunctors
00084 }//CGAL
00085 
00086 #endif //CGAL_SPHERICAL_KERNEL_PREDICATES_COMPARE_3_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines