BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Cartesian/ft_constructions_3.h
Go to the documentation of this file.
00001 // Copyright (c) 2000  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/Cartesian_kernel/include/CGAL/Cartesian/ft_constructions_3.h $
00019 // $Id: ft_constructions_3.h 43439 2008-06-04 08:46:51Z pmachado $
00020 // 
00021 //
00022 // Author(s)     : Herve Bronnimann
00023 
00024 #ifndef CGAL_CARTESIAN_FT_CONSTRUCTIONS_3_H
00025 #define CGAL_CARTESIAN_FT_CONSTRUCTIONS_3_H
00026 
00027 #include <CGAL/Cartesian/Point_3.h>
00028 #include <CGAL/Cartesian/Vector_3.h>
00029 #include <CGAL/Cartesian/Plane_3.h>
00030 #include <CGAL/constructions/kernel_ftC3.h>
00031 
00032 CGAL_BEGIN_NAMESPACE
00033 
00034 template < class K >
00035 inline
00036 typename K::FT
00037 squared_distance(const PointC3<K> &p,
00038                  const PointC3<K> &q)
00039 {
00040   return squared_distanceC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z());
00041 }
00042 
00043 template < class K >
00044 inline
00045 typename K::FT
00046 scaled_distance_to_plane(const PlaneC3<K> &h,
00047                          const PointC3<K> &p)
00048 {
00049   return scaled_distance_to_planeC3(h.a(), h.b(), h.c(), h.d(),
00050                                     p.x(), p.y(), p.z());
00051 }
00052 
00053 template < class K >
00054 inline
00055 typename K::FT
00056 scaled_distance_to_plane(const PointC3<K> &hp,
00057                          const PointC3<K> &hq,
00058                          const PointC3<K> &hr,
00059                          const PointC3<K> &p)
00060 {
00061   return scaled_distance_to_planeC3(hp.x(), hp.y(), hp.z(),
00062                                     hq.x(), hq.y(), hq.z(),
00063                                     hr.x(), hr.y(), hr.z(),
00064                                     p.x(), p.y(), p.z());
00065 }
00066 
00067 CGAL_END_NAMESPACE
00068 
00069 #endif // CGAL_CARTESIAN_FT_CONSTRUCTIONS_3_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines