BWAPI
|
00001 // Copyright (c) 2007 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_topology_traits/Arr_bounded_planar_vert_decomp_helper.h $ 00015 // $Id: Arr_bounded_planar_vert_decomp_helper.h 40867 2007-11-13 14:53:47Z efif $ 00016 // 00017 // 00018 // Author(s) : Ron Wein <wein@post.tau.ac.il> 00019 00020 #ifndef CGAL_ARR_BOUNDED_PLANAR_VERT_DEOCMP_HELPER_H 00021 #define CGAL_ARR_BOUNDED_PLANAR_VERT_DEOCMP_HELPER_H 00022 00027 CGAL_BEGIN_NAMESPACE 00028 00029 #include <CGAL/Sweep_line_empty_visitor.h> 00030 00036 template <class Traits_, class Arrangement_> 00037 class Arr_bounded_planar_vert_decomp_helper 00038 { 00039 public: 00040 00041 typedef Traits_ Traits_2; 00042 typedef Arrangement_ Arrangement_2; 00043 00044 typedef typename Arrangement_2::Face_const_handle Face_const_handle; 00045 00046 typedef Sweep_line_empty_visitor<Traits_2> Base_visitor; 00047 typedef typename Base_visitor::Event Event; 00048 typedef typename Base_visitor::Subcurve Subcurve; 00049 00050 protected: 00051 00052 typedef typename Arrangement_2::Topology_traits Topology_traits; 00053 00054 // Data members: 00055 const Topology_traits *m_top_traits; // The topology-traits class. 00056 Face_const_handle m_unb_face; // The unbounded arrangement face. 00057 00058 public: 00059 00064 Arr_bounded_planar_vert_decomp_helper (const Arrangement_2 *arr) : 00065 m_top_traits (arr->topology_traits()) 00066 {} 00067 00069 00070 00071 /* A notification issued before the sweep process starts. */ 00072 void before_sweep () 00073 { 00074 // Get the unbounded face. 00075 m_unb_face = Face_const_handle (m_top_traits->unbounded_face()); 00076 } 00077 00082 void after_handle_event (Event* /* event */) 00083 { 00084 return; 00085 } 00087 00089 CGAL::Object top_object () const 00090 { 00091 // Wrap the unbounded face by a CGAL object. 00092 return (CGAL::make_object (m_unb_face)); 00093 } 00094 00096 CGAL::Object bottom_object () const 00097 { 00098 // Wrap the unbounded face by a CGAL object. 00099 return (CGAL::make_object (m_unb_face)); 00100 } 00101 00102 }; 00103 00104 CGAL_END_NAMESPACE 00105 00106 #endif