|
BWAPI
|
00001 // Copyright (c) 2003,2004,2005 INRIA Sophia-Antipolis (France) and 00002 // Notre Dame University (U.S.A.). 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/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h $ 00015 // $Id: Segment_Delaunay_graph_vertex_base_2.h 48908 2009-04-26 14:03:12Z spion $ 00016 // 00017 // 00018 // Author(s) : Menelaos Karavelas <mkaravel@cse.nd.edu> 00019 00020 00021 00022 00023 #ifndef CGAL_SEGMENT_DELAUNAY_GRAPH_VERTEX_BASE_2_H 00024 #define CGAL_SEGMENT_DELAUNAY_GRAPH_VERTEX_BASE_2_H 00025 00026 #include <CGAL/Segment_Delaunay_graph_2/basic.h> 00027 00028 #include <CGAL/Triangulation_ds_vertex_base_2.h> 00029 #include <CGAL/Segment_Delaunay_graph_storage_site_2.h> 00030 #include <CGAL/Segment_Delaunay_graph_simple_storage_site_2.h> 00031 00032 00033 00034 CGAL_BEGIN_NAMESPACE 00035 00036 template < class STraits, class Vb = Triangulation_ds_vertex_base_2<> > 00037 class Segment_Delaunay_graph_vertex_base_2 00038 : public Vb 00039 { 00040 private: 00041 typedef typename Vb::Triangulation_data_structure D_S; 00042 typedef Vb Base; 00043 00044 public: 00045 // TYPES 00046 //------ 00047 typedef STraits Storage_traits; 00048 typedef typename Storage_traits::Geom_traits Geom_traits; 00049 typedef typename Geom_traits::Site_2 Site_2; 00050 typedef typename Storage_traits::Storage_site_2 Storage_site_2; 00051 typedef D_S Data_structure; 00052 00053 typedef typename D_S::Face_handle Face_handle; 00054 typedef typename D_S::Vertex_handle Vertex_handle; 00055 00056 00057 template < typename DS2 > 00058 struct Rebind_TDS { 00059 typedef typename Vb::template Rebind_TDS<DS2>::Other Vb2; 00060 typedef Segment_Delaunay_graph_vertex_base_2<STraits,Vb2> Other; 00061 }; 00062 00063 00064 Segment_Delaunay_graph_vertex_base_2 () : Vb(), ss_() {} 00065 00066 Segment_Delaunay_graph_vertex_base_2(const Storage_site_2& ss, 00067 Face_handle f) 00068 : Vb(f), ss_(ss) {} 00069 00070 void set_site(const Storage_site_2& ss) { ss_ = ss; } 00071 00072 const Storage_site_2& storage_site() const { return ss_; } 00073 Site_2 site() const { return ss_.site(); } 00074 00075 #if 1 00076 // MK::ERROR: these must be removed; one may use the storage site to 00077 // get access to this info... 00078 bool is_segment() const { return ss_.is_segment(); } 00079 bool is_point() const { return ss_.is_point(); } 00080 #endif 00081 00082 //the following trivial is_valid to allow 00083 // the user of derived face base classes 00084 // to add their own purpose checking 00085 bool is_valid(bool /* verbose */ = false, int /* level */ = 0) const 00086 { return true; } 00087 00088 private: 00089 Storage_site_2 ss_; 00090 // std::list<Vb> adjseg_list; // list of adjacent segments; this is 00091 // important when I want to do deletions 00092 }; 00093 00094 00095 CGAL_END_NAMESPACE 00096 00097 #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_VERTEX_BASE_2_H
1.7.6.1