BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Cartesian/plane_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/plane_constructions_3.h $
00019 // $Id: plane_constructions_3.h 43444 2008-06-04 09:03:30Z pmachado $
00020 // 
00021 //
00022 // Author(s)     : Herve Bronnimann, Sylvain Pion
00023 
00024 #ifndef CGAL_CARTESIAN_PLANE_CONSTRUCTIONS_3_H
00025 #define CGAL_CARTESIAN_PLANE_CONSTRUCTIONS_3_H
00026 
00027 #include <CGAL/Cartesian/Point_3.h>
00028 #include <CGAL/constructions/kernel_ftC3.h>
00029 
00030 CGAL_BEGIN_NAMESPACE
00031 
00032 template <class R>
00033 CGAL_KERNEL_LARGE_INLINE
00034 PlaneC3<R>
00035 plane_from_points(const PointC3<R> &p,
00036                   const PointC3<R> &q,
00037                   const PointC3<R> &r)
00038 {
00039   typename R::FT a, b, c, d;
00040   plane_from_pointsC3(p.x(), p.y(), p.z(),
00041                       q.x(), q.y(), q.z(),
00042                       r.x(), r.y(), r.z(),
00043                       a, b, c, d);
00044   return PlaneC3<R>(a, b, c, d);
00045 }
00046 
00047 template <class R>
00048 CGAL_KERNEL_LARGE_INLINE
00049 PlaneC3<R>
00050 plane_from_point_direction(const PointC3<R> &p,
00051                            const DirectionC3<R> &d)
00052 {
00053   typename R::FT A, B, C, D;
00054   plane_from_point_directionC3(p.x(), p.y(), p.z(), d.dx(), d.dy(), d.dz(),
00055                                A, B, C, D);
00056   return PlaneC3<R>(A, B, C, D);
00057 }
00058 
00059 CGAL_END_NAMESPACE
00060 
00061 #endif // CGAL_CARTESIAN_PLANE_CONSTRUCTIONS_3_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines