BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Triangulation_utils_2.h
Go to the documentation of this file.
00001 // Copyright (c) 1997  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/Triangulation_2/include/CGAL/Triangulation_utils_2.h $
00015 // $Id: Triangulation_utils_2.h 46206 2008-10-11 20:21:08Z spion $
00016 // 
00017 //
00018 // Author(s)     : Mariette Yvinec <Mariette.Yvinec@sophia.inria.fr>
00019 //                 Sylvain Pion
00020 //                 Andreas Fabri   <Andreas.Fabri@geometryfactory.com>
00021 
00022 #ifndef CGAL_TRIANGULATION_UTILS_2_H
00023 #define CGAL_TRIANGULATION_UTILS_2_H
00024 
00025 #include <CGAL/triangulation_assertions.h>
00026 
00027 CGAL_BEGIN_NAMESPACE 
00028 template < class T = void >
00029 struct Triangulation_cw_ccw_static_2 {
00030 
00031 static const int ccw_map[3];
00032 static const int cw_map[3];
00033 };
00034 template < class T >
00035 const int Triangulation_cw_ccw_static_2<T>::ccw_map[3] = {1, 2, 0};
00036 
00037 template < class T >
00038 const int Triangulation_cw_ccw_static_2<T>::cw_map[3] = {2, 0, 1};
00039 
00040 class Triangulation_cw_ccw_2 
00041   : public  Triangulation_cw_ccw_static_2<>
00042 {
00043 public:
00044   static int ccw(const int i) 
00045     {
00046       CGAL_triangulation_precondition( i >= 0 && i < 3);
00047       return ccw_map[i];
00048     }
00049 
00050   static int cw(const int i)
00051     {
00052       CGAL_triangulation_precondition( i >= 0 && i < 3);
00053       return cw_map[i];
00054     }
00055 };
00056 
00057 CGAL_END_NAMESPACE
00058 
00059 #endif //CGAL_TRIANGULATION_UTILS_2_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines