CGAL 5.2.4 - 2D Arrangements

Classes

class  CGAL::Arr_landmarks_point_location< Arrangement, Generator >
 
class  CGAL::Arr_naive_point_location< Arrangement >
 
struct  CGAL::Arr_point_location_result< Arrangement >
 A unary metafunction to determine the return type of a point-location or vertical ray-shoot query. More...
 
class  CGAL::Arr_trapezoid_ric_point_location< Arrangement >
 
class  CGAL::Arr_walk_along_line_point_location< Arrangement >
 

Macros

#define CGAL_ARR_POINT_LOCATION_VERSION
 The macro CGAL_ARR_POINT_LOCATION_VERSION can be used to configure the point-location query API. More...
 

Functions

template<typename Traits , typename Dcel , typename InputIterator , typename OutputIterator >
OutputIterator CGAL::locate (const Arrangement_2< Traits, Dcel > &arr, InputIterator points_begin, InputIterator points_end, OutputIterator oi)
 Performs a batched point-location operation on a given arrangement. More...
 

Macro Definition Documentation

◆ CGAL_ARR_POINT_LOCATION_VERSION

#define CGAL_ARR_POINT_LOCATION_VERSION

#include <CGAL/Arr_point_location_result.h>

The macro CGAL_ARR_POINT_LOCATION_VERSION can be used to configure the point-location query API.

In particular, it determines which version of the result type of the point-location and vertical ray-shooting queries should be used by models of the concepts ArrangementPointLocation_2 and ArrangementVerticalRayShoot_2, and by the free function locate. The CGAL_ARR_POINT_LOCATION_VERSION should be defined before any CGAL header is included.

  • CGAL_ARR_POINT_LOCATION_VERSION == 1, the result type is set to be CGAL::Object.
  • CGAL_ARR_POINT_LOCATION_VERSION == 2, the result type is set to be boost::variant<Vertex_const_handle,Halfedge_const_handle,Face_const_handle>, where Vertex_const_handle, Halfedge_const_handle, and Face_const_handle are the corresponding nested types in a CGAL::Arrangement_2 instance.
See also
ArrangementPointLocation_2
ArrangementVerticalRayShoot_2
CGAL::Arr_point_location_result<Arrangement>

Function Documentation

◆ locate()

template<typename Traits , typename Dcel , typename InputIterator , typename OutputIterator >
OutputIterator CGAL::locate ( const Arrangement_2< Traits, Dcel > &  arr,
InputIterator  points_begin,
InputIterator  points_end,
OutputIterator  oi 
)

#include <CGAL/Arr_batched_point_location.h>

Performs a batched point-location operation on a given arrangement.

It accepts a range of query points, and locates each point in the arrangement. The query results are returned through the output iterator. Each query result is given as a pair of the query point and an object representing the arrangement feature that contains it, namely a discriminated union container of the bounded types Face_const_handle, Halfedge_const_handle, and Vertex_const_hanlde. The resulting pairs in the output sequence are sorted in increasing \( xy\)-lexicographical order of the query points. The function returns a past-the-end iterator of the output sequence.

Requirements

A Note on Backwards Compatibility
This function used to return CGAL::Object up to CGAL version 4.2. Starting with CGAL version 4.3 the return type is determined by the metafunction CGAL::Arr_point_location_result. To preserve backwards compatibility CGAL::Object can be constructed from the new return type implicitly, but switching to the new style is recommended. To enable the old style without any overhead, the macro CGAL_ARR_POINT_LOCATION_VERSION can be defined to 1 before any CGAL header is included.

See also
CGAL::Arr_point_location_result<Arrangement>
CGAL_ARR_POINT_LOCATION_VERSION
Examples:
Arrangement_on_surface_2/batched_point_location.cpp.