Concept

ArrangementPointLocation_2

Definition

A model of the ArrangementPointLocation_2 concept can be attached to an Arrangement_2 instance and answer point-location queries on this arrangement. Namely, given a Arrangement_2::Point_2 object, representing a point in the plane, it returns the arrangement cell containing it. In the general case, the query point is contained inside an arrangement face, but in degenerate situations it may lie on an edge or coincide with an arrangement vertex.

Types

ArrangementPointLocation_2::Arrangement_2
the associated arrangement type.


ArrangementPointLocation_2::Point_2
equivalent to Arrangement_2::Point_2.

Creation

ArrangementPointLocation_2 pl;
default constructor.


ArrangementPointLocation_2 pl ( Arrangement_2 arr);
constructs a point-location object pl attached to the given arrangement arr.

Query Functions

Object pl.locate ( Point_2 q) const locates the arrangement cell that contains the query point q and returns a handle for this cell. The function returns an Object instance that wraps either of the following types:
  • Arrangement_2::Face_const_handle, in case q is contained inside an arrangement face;
  • Arrangement_2::Halfedge_const_handle, in case q lies on an arrangement edge;
  • Arrangement_2::Vertex_const_handle, in case q coincides with an arrangement vertex.
Precondition: pl is attached to a valid arrangement instance.

Operations

void pl.attach ( Arrangement_2 arr) attaches pl to the given arrangement arr.

void pl.detach () detaches pl from the arrangement it is currently attached to.

Has Models

Arr_naive_point_location<Arrangement>
Arr_walk_along_a_line_point_location<Arrangement>
Arr_trapezoid_ric_point_location<Arrangement>
Arr_landmarks_point_location<Arrangement,Generator>