Function

CGAL::decompose

Definition

The function decompose produces the symbolic vertical decomposition of a given arrangement, performing a batched vertical ray-shooting query from all arrangement vertices, such that every vertex is associated with a pair of objects, one corresponds to the arrangement feature that lies below it, and the other corresponds to the feature that lies above it. The output of this function can be readily used for inserting vertical walls and physically decomposing the arrangement into pseudo-trapezoids. To do this, it is convenient to process the vertices in an ascending xy-lexicographic order. The visible objects are therefore returned through an output iterator, which pairs each finite arrangement vertex with the two features it ``sees'', such that the vertices are given in ascending xy-lexicographic order.

#include <CGAL/Arr_vertical_decomposition_2.h>

template<typename Traits, typename Dcel, typename OutputIterator>
OutputIterator decompose ( Arrangement_2<Traits,Dcel> arr, OutputIterator oi)
Produces the symbolic vertical decomposition of the arr arrangement. More precisely, it performs a batched vertical ray-shooting query from all arrangement vertices, such that every vertex is associated with a pair of objects, one corresponding to the arrangement feature that lies below it, while the other corresponds to the feature that lies above it. The query results are returned through the output iterator, which pairs each finite arrangement vertex with a pair of Objects, the first represents the feature below the vertex, and the second represents the feature that lies above it. Each Object may be one of the following: The function returns a past-the-end iterator for its output sequence.

Requirements

OutputIterator::value_type must be pair<Arrangement_2::Vertex_const_handle, pair<Object, Object> >.