BWAPI
|
00001 // Copyright (c) 2005 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/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_intersection_visitor.h $ 00015 // $Id: Gps_bfs_intersection_visitor.h 48113 2009-02-17 16:21:43Z ophirset $ 00016 // 00017 // 00018 00019 // Author(s) : Baruch Zukerman <baruchzu@post.tau.ac.il> 00020 // Ophir Setter <ophir.setter@cs.tau.ac.il> 00021 00022 00023 #ifndef CGAL_GPS_BFS_INTERSECTION_VISITOR_H 00024 #define CGAL_GPS_BFS_INTERSECTION_VISITOR_H 00025 00026 #include <CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h> 00027 00028 CGAL_BEGIN_NAMESPACE 00029 00030 template <class Arrangement_> 00031 class Gps_bfs_intersection_visitor : 00032 public Gps_bfs_base_visitor<Arrangement_, Gps_bfs_intersection_visitor<Arrangement_> > 00033 { 00034 typedef Arrangement_ Arrangement; 00035 typedef typename Arrangement::Face_iterator Face_iterator; 00036 typedef typename Arrangement::Halfedge_iterator Halfedge_iterator; 00037 typedef Gps_bfs_intersection_visitor<Arrangement> Self; 00038 typedef Gps_bfs_base_visitor<Arrangement, Self> Base; 00039 typedef typename Base::Edges_hash Edges_hash; 00040 typedef typename Base::Faces_hash Faces_hash; 00041 00042 00043 public: 00044 00045 Gps_bfs_intersection_visitor(Edges_hash* edges_hash, 00046 Faces_hash* faces_hash, 00047 unsigned int n_polygons): 00048 Base(edges_hash, faces_hash, n_polygons) 00049 {} 00050 00051 00053 00058 bool contained_criteria(unsigned int ic) 00059 { 00060 // intersection means that all polygons contain the face. 00061 CGAL_assertion(ic <= this->m_num_of_polygons); 00062 return (ic == this->m_num_of_polygons); 00063 } 00064 00065 void after_scan(Arrangement&) 00066 {} 00067 }; 00068 00069 CGAL_END_NAMESPACE 00070 00071 #endif