BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Homogeneous/Data_accessorH2.h
Go to the documentation of this file.
00001 // Copyright (c) 1999,2001  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/Homogeneous_kernel/include/CGAL/Homogeneous/Data_accessorH2.h $
00019 // $Id: Data_accessorH2.h 28567 2006-02-16 14:30:13Z lsaboret $
00020 // 
00021 //
00022 // Author(s)     : Stefan Schirra
00023  
00024 
00025 #ifndef CGAL_DATA_ACCESSORH2_H
00026 #define CGAL_DATA_ACCESSORH2_H
00027 
00028 CGAL_BEGIN_NAMESPACE
00029 
00030 template < class R >
00031 class Data_accessorH2
00032 {
00033 public:
00034     typedef typename R::FT FT;
00035     typedef typename R::RT RT;
00036     typedef typename R::Point_2      Point_2;
00037 
00038     RT  get_hx( const Point_2 & p) const { return( p.hx()); }
00039     RT  get_hy( const Point_2 & p) const { return( p.hy()); }
00040     RT  get_hw( const Point_2 & p) const { return( p.hw()); }
00041 
00042     void
00043     get( const Point_2 & p, RT& hx, RT& hy, RT& hw) const
00044     {
00045         hx = get_hx( p);
00046         hy = get_hy( p);
00047         hw = get_hw( p);
00048     }
00049 
00050     void
00051     set( Point_2& p, const RT & hx, const RT & hy, const RT & hw) const
00052     {
00053         p = Point_2( hx, hy, hw);
00054     }
00055 };
00056 
00057 CGAL_END_NAMESPACE
00058 
00059 #endif // CGAL_DATA_ACCESSORH2_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines