Navigation: Up, Table of Contents, Bibliography, Index, Title Page

## CGAL::Planar_map_with_intersections_2<Planar_map>

### Definition

An object pmwx of the class Planar_map_with_intersections_2<Planar_map> represents the planar subdivision induced by a set of curves that are possibly intersecting. This class extends the class Planar_map_2<Dcel,Traits> which handles x-monotone pairwise interior disjoint curves. An object of the class Planar_map_with_intersections_2<Planar_map> is also a planar map and therefore the types, constants, and traversal iterators and operations remain the same.

#include <CGAL/Pm_with_intersections.h>

### Inherits From

CGAL::Planar_map_2<Dcel,Traits>

Note that the modifying insertion functions override the inherited functions. The insertion functions of Planar_map_with_intersections_2<Planar_map> handle general curves, including non-x-monotone curves, pairwise overlapping, or pairwise intersecting curves, and are slower than their counterparts of the CGAL::Planar_map_2<Dcel,Traits> base class. X-monotone curves that are pairwise disjoint in their interiors can be inserted efficiently through a subset of insertion functions listed below. These functions begin with the prefix non_intersecting.

### Types

Planar_map_with_intersections_2<Planar_map>::Pmwx_change_notification

### Creation

Planar_map_with_intersections_2<Planar_map> pmwx;
| creates an empty planar map with the default point location strategy.
Planar_map_with_intersections_2<Planar_map> pmwx ( | Pm_point_location_base<Planar_map> *pl);
| creates an empty planar map with *pl as the point location strategy.
Planar_map_with_intersections_2<Planar_map> pmwx ( | Traits tr, Pm_point_location_base<Planar_map> *pl);
| creates an empty planar map with tr as the traits class and *pl as the point location strategy.

### Operations

Halfedge_handle |
pmwx.insert ( | X_monotone_curve_2 cv, Pmwx_change_notification *en = NULL)
|  | inserts the x-monotone curve cv into the planar map. Returns the last inserted halfedge whose target points to the target point of cv. Precondition: cv is not equivalent to a point.
template <X_curve_iterator>
Halfedge_handle |
pmwx.insert ( | X_curve_iterator begin, X_curve_iterator end, Pmwx_change_notification *en = NULL)
|  | inserts the given range of curves into the map in an aggregated manner, using the sweep-line algorithm. begin and end are input iterators that point to the first curve and past-the-end curve of the range respectively. insert() returns a handle to a new halfedge directed in the same way as the last curve in the range. Precondition: no curve in the given range is equivalent to a point.

| advanced |

### Non Intersecting Insertion Functions

The following functions do not check for intersections. They simply call the Planar_map_2 corresponding insert functions. Therefore, they are more efficient than their counterpart insert-functions. but should be used with care (see also for details including the full list of preconditions).

Halfedge_handle |
pmwx.non_intersecting_insert ( | X_monotone_curve_2 cv, Change_notification * en = NULL)
|  | inserts the curve cv into the map. non_intersecting_insert() returns a handle to a new halfedge directed in the same way as the curve cv. Precondition: cv has no proper intersection with any curve of the map.
template <class X_monotone_curve_2_iterator>
Halfedge_iterator |
pmwx.non_intersecting_insert ( | X_monotone_curve_2_iterator begin, X_monotone_curve_2_iterator end, Change_notification * en = NULL)
|  | iterates through a given range of curves, inserting the curves into the map. begin and end are input iterators that point to the first curve and past-the-end curve of the range respectively. non_intersecting_insert() returns a handle to a new halfedge directed in the same way as the last curve in the range. Precondition: the curves of the map do not intersect the any of the curves in the given range in its interior, and all curves in the range are disjoint in their interior.
Halfedge_handle |
pmwx.non_intersecting_insert_in_face_interior ( | X_monotone_curve_2 cv, Face_handle f, Change_notification * en = NULL)
|  | inserts the curve cv as a new inner component of the face f. non_intersecting_insert_in_face_interior() returns a handle to a new halfedge directed in the same way as cv. Precondition: cv has no proper intersection with any curve of the map.
Halfedge_handle |
pmwx.non_intersecting_insert_from_vertex ( | X_monotone_curve_2 cv, Halfedge_handle h, Change_notification * en = NULL)
|  | inserts the curve cv into the map. One endpoint of cv is the point of the target vertex, v, of the given halfedge h. non_intersecting_insert_from_vertex returns a handle to a new halfedge that has v as its source vertex. The returened twin halfedge is inserted immediately after h in the circular list of halfedges that share the same target vertex v. Precondition: cv has no proper intersection with any curve of the map.
Halfedge_handle |
pmwx.non_intersecting_insert_at_vertices ( | X_monotone_curve_2 cv, Halfedge_handle h1, Halfedge_handle h2, Change_notification * en = NULL)
|  | inserts the curve cv into the map. The two endpoints of cv are held by the two target vertices v1 and v2 of h1 and h2 respectively. non_intersecting_insert_at_vertices() returns a handle to a new halfedge, that has v1 and v2 as its source and target vertices respectively. The returened halfedge is inserted immediately after h1 in the circular list of halfedges that share the same target vertex v1. Its twin halfedge is inserted immediately after h2 in the circular list of halfedges that share the same target vertex v2. Precondition: cv has no proper intersection with any curve of the map.
Halfedge_handle |
pmwx.non_intersecting_insert_from_vertex ( | X_monotone_curve_2 cv, Vertex_handle v, Change_notification * en = NULL)
|  | inserts the curve cv into the map. One endpoint of cv is the point of the given vertex v, that is already in the map. non_intersecting_insert_from_vertex returns a handle to a new halfedge that has v as its source vertex. Precondition: cv has no proper intersection with any curve of the map.
Halfedge_handle |
pmwx.non_intersecting_insert_at_vertices ( | X_monotone_curve_2 cv, Vertex_handle v1, Vertex_handle v2, Change_notification * en = NULL)
|  | inserts the curve cv into the map. The two endpoints of cv are held by the two given vertices v1 and v2 respectively, that are already in the map. non_intersecting_insert_at_vertices() returns a handle to a new halfedge, that has v1 and v2 as its source and target vertices respectively. Precondition: cv has no proper intersection with any curve of the map.

| advanced |

Next: PlanarMapWithIntersectionsTraits_2

Navigation: Table of Contents, Bibliography, Index, Title Page

The CGAL Project . Tue, December 21, 2004 .