CGAL 6.0.1 - 2D Arrangements
Loading...
Searching...
No Matches
ArrangementPointLocation_2 Concept Reference

Definition

A model of the ArrangementPointLocation_2 concept can answer point-location queries on an arrangement attached to it. 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.

Has models
CGAL::Arr_naive_point_location<Arrangement>
CGAL::Arr_walk_along_line_point_location<Arrangement>
CGAL::Arr_trapezoid_ric_point_location<Arrangement>
CGAL::Arr_landmarks_point_location<Arrangement,Generator>
See also
CGAL::Arr_naive_point_location<Arrangement>
CGAL::Arr_walk_along_line_point_location<Arrangement>
CGAL::Arr_trapezoid_ric_point_location<Arrangement>
CGAL::Arr_landmarks_point_location<Arrangement,Generator>
CGAL::Arr_point_location_result<Arrangement>

Types

typedef unspecified_type Arrangement_2
 the associated arrangement type.
 
typedef unspecified_type Point_2
 equivalent to Arrangement_2::Point_2.
 

Creation

 ArrangementPointLocation_2 ()
 default constructor.
 
 ArrangementPointLocation_2 (const Arrangement_2 &arr)
 constructs a point-location object pl attached to the given arrangement arr.
 

Query Functions

Arr_point_location_result< Arrangement_2 >::Type locate (const Point_2 &q) const
 locates the arrangement cell that contains the query point q and returns a discriminated union container of the following bounded types:
 

Operations

void attach (const Arrangement_2 &arr)
 attaches pl to the given arrangement arr.
 
void detach ()
 detaches pl from the arrangement it is currently attached to.
 

Member Function Documentation

◆ locate()

Arr_point_location_result< Arrangement_2 >::Type ArrangementPointLocation_2::locate ( const Point_2 q) const

locates the arrangement cell that contains the query point q and returns a discriminated union container of the following bounded 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 object.