BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Arr_topology_traits/Arr_bounded_planar_construction_helper.h
Go to the documentation of this file.
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_topology_traits/Arr_bounded_planar_construction_helper.h $
00015 // $Id: Arr_bounded_planar_construction_helper.h 40370 2007-09-18 14:04:12Z efif $
00016 // 
00017 //
00018 // Author(s)     : Baruch Zukerman <baruchzu@post.tau.ac.il>
00019 //                 Ron Wein <wein@post.tau.ac.il>
00020 
00021 #ifndef CGAL_ARR_BOUNDED_PLANAR_CONSTRUCTION_HELPER_H
00022 #define CGAL_ARR_BOUNDED_PLANAR_CONSTRUCTION_HELPER_H
00023 
00028 #include <CGAL/Sweep_line_empty_visitor.h>
00029 #include <CGAL/Unique_hash_map.h>
00030 
00031 CGAL_BEGIN_NAMESPACE
00032 
00038 template <class Traits_, class Arrangement_, class Event_, class Subcurve_> 
00039 class Arr_bounded_planar_construction_helper
00040 {
00041 public:
00042 
00043   typedef Traits_                                      Traits_2;
00044   typedef Arrangement_                                 Arrangement_2;
00045   typedef Event_                                       Event;
00046   typedef Subcurve_                                    Subcurve;
00047 
00048   typedef typename Traits_2::X_monotone_curve_2        X_monotone_curve_2;
00049   typedef typename Traits_2::Point_2                   Point_2;
00050 
00051   typedef Sweep_line_empty_visitor<Traits_2,
00052                                    Subcurve,
00053                                    Event>              Base_visitor;
00054 
00055   typedef typename Arrangement_2::Face_handle          Face_handle;
00056   typedef typename Arrangement_2::Halfedge_handle      Halfedge_handle;
00057   
00058   typedef typename Subcurve::Halfedge_indices_list     Indices_list;
00059   typedef Unique_hash_map<Halfedge_handle, 
00060                           Indices_list>                Halfedge_indices_map;
00061 
00062 protected:
00063 
00064   typedef typename Arrangement_2::Topology_traits      Topology_traits;
00065 
00066   // Data members:
00067   Topology_traits         *m_top_traits;  // The topology-traits class.
00068   Face_handle              m_unb_face;    // The unbounded arrangement face.
00069 
00070 public:
00071  
00073   Arr_bounded_planar_construction_helper (Arrangement_2 *arr) :
00074     m_top_traits (arr->topology_traits())
00075   {}
00076 
00078   virtual ~Arr_bounded_planar_construction_helper()
00079   {}
00080 
00082 
00083 
00084   /* A notification issued before the sweep process starts. */
00085   virtual void before_sweep ()
00086   {
00087     // Get the unbounded face.
00088     m_unb_face = Face_handle (m_top_traits->unbounded_face());
00089   }
00090 
00095   virtual void before_handle_event (Event* /* event */)
00096   {
00097     return;
00098   }
00099 
00101   virtual void add_subcurve (Halfedge_handle /* he */, Subcurve* /* sc */)
00102   {
00103     return;
00104   }
00105 
00107   void add_subcurve_in_top_face (unsigned int /* index */)
00108   {
00109     return;
00110   }
00111 
00113   void before_deallocate_event (Event* /* event */)
00114   {
00115     return;
00116   }
00118   
00123   void set_halfedge_indices_map (Halfedge_indices_map& /* table */)
00124   {
00125     return;
00126   }
00127 
00132   bool swap_predecessors (Event* /* event */) const
00133   {
00134     // In the bounded case the order of the predecessor is always correct
00135     // and there is no need to swap them.
00136     return (false);
00137   }
00138 
00140   Face_handle top_face () const
00141   {
00142     return (m_unb_face);
00143   }
00144 };
00145 
00146 CGAL_END_NAMESPACE
00147 
00148 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines