BWAPI
|
00001 // Copyright (c) 2006 Tel-Aviv University (Israel). 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/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_arr_dcel.h $ 00015 // $Id: Arr_polyhedral_sgm_arr_dcel.h 50602 2009-07-14 14:39:28Z naamamay $ 00016 // 00017 // 00018 // Author(s) : Efi Fogel <efif@post.tau.ac.il> 00019 00020 #ifndef CGAL_ARR_POLYHEDRAL_SGM_ARR_DCEL_H 00021 #define CGAL_ARR_POLYHEDRAL_SGM_ARR_DCEL_H 00022 00023 #include <CGAL/basic.h> 00024 00025 CGAL_BEGIN_NAMESPACE 00026 00028 template <class Point_2> 00029 class Arr_polyhedral_sgm_arr_vertex : public CGAL::Arr_vertex_base<Point_2> { 00030 public: 00032 Arr_polyhedral_sgm_arr_vertex() {} 00033 }; 00034 00036 template <class X_monotone_curve_2> 00037 class Arr_polyhedral_sgm_arr_halfedge : 00038 public CGAL::Arr_halfedge_base<X_monotone_curve_2> 00039 { 00040 private: 00047 unsigned int m_arr_mask; 00048 00049 public: 00051 Arr_polyhedral_sgm_arr_halfedge() : m_arr_mask(0x0) {} 00052 00057 void add_arr(unsigned int id) { m_arr_mask |= 0x1 << id; } 00058 00062 bool is_arr(unsigned int id) const { return m_arr_mask & (0x1 << id); } 00063 00067 unsigned int arr_mask() const { return m_arr_mask; } 00068 00072 void set_arr(unsigned int id) { m_arr_mask = id; } 00073 }; 00074 00076 template <class Point_3> 00077 class Arr_polyhedral_sgm_arr_face : public CGAL::Arr_face_base { 00078 private: 00080 Point_3 m_point; 00081 00083 bool m_is_set; 00084 00085 public: 00087 Arr_polyhedral_sgm_arr_face() : m_is_set(false) { } 00088 00090 void set_point(const Point_3 & point) 00091 { 00092 m_point = point; 00093 m_is_set = true; 00094 } 00095 00097 const Point_3 & point() const { return m_point; } 00098 00100 bool is_set() const { return m_is_set; } 00101 00103 void set_is_set(bool flag) { m_is_set = flag; } 00104 }; 00105 00107 template <class Traits> 00108 class Arr_polyhedral_sgm_arr_dcel : 00109 public CGAL::Arr_dcel_base<Arr_polyhedral_sgm_arr_vertex<typename Traits::Point_2>, 00110 Arr_polyhedral_sgm_arr_halfedge<typename Traits::X_monotone_curve_2>, 00111 Arr_polyhedral_sgm_arr_face<typename Traits::Point_3> > 00112 { 00113 public: 00115 Arr_polyhedral_sgm_arr_dcel() {} 00116 }; 00117 00118 CGAL_END_NAMESPACE 00119 00120 #endif