Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

planar_map.hpp

Go to the documentation of this file.
00001 #ifndef _PLANAR_MAP_H
00002 #define _PLANAR_MAP_H
00003 
00004 #include <CGAL/basic.h>
00005 #include <CGAL/Pm_default_dcel.h>
00006 #include <CGAL/Pm_segment_traits_2.h>
00007 #include <CGAL/Planar_map_2.h>
00008 #include <CGAL/Topological_map.h>
00009 #include "geometry.hpp"
00010 
00011 namespace Arak {
00012   namespace Geometry {
00013 
00014     class VisitingFace : public CGAL::Pm_face_base {
00015       bool visited;
00016     public:
00017       VisitingFace() : CGAL::Pm_face_base(), visited(false) {}
00018       bool wasVisited() { return visited; }
00019       void visit() { visited = true; }
00020     };
00021 
00022     typedef CGAL::Pm_segment_traits_2<ExactPredKernel> Traits;
00023     typedef CGAL::Pm_dcel<CGAL::Pm_vertex_base<Traits::Point>,
00024         CGAL::Pm_halfedge_base<Traits::X_curve>,
00025         Arak::Geometry::VisitingFace > Dcel;  
00026     typedef Traits::X_monotone_curve_2           Curve;
00027     typedef CGAL::Planar_map_2<Dcel,Traits>      PlanarMap;
00028     typedef PlanarMap::Locate_type               LocateType;
00029     typedef PlanarMap::Vertex_handle             VertexHandle;
00030     typedef PlanarMap::Halfedge_handle           HalfedgeHandle;
00031     typedef PlanarMap::Face_handle               FaceHandle;
00032     typedef PlanarMap::Halfedge_iterator         HalfedgeIterator;
00033     typedef PlanarMap::Holes_iterator            HolesIterator;
00034     typedef PlanarMap::Ccb_halfedge_circulator   CCBHalfedgeCirculator;
00035 
00036     typedef ExactPredKernel::Point_2             ExactPredPoint;
00037     typedef ExactPredKernel::Segment_2           ExactPredSegment;
00038 
00039     inline ExactPredPoint toExactPredPoint(const Point& p) {
00040       return ExactPredPoint(p.x(), p.y());
00041     }
00042 
00043     inline ExactPredSegment toExactPredSegment(const Segment& s) {
00044       return ExactPredSegment(toExactPredPoint(s.source()),
00045             toExactPredPoint(s.target()));
00046     }
00047   }
00048 }
00049 
00050 #endif

Generated on Wed May 25 14:39:18 2005 for Arak by doxygen 1.3.6