CGAL 6.1 - 2D Arrangements
Loading...
Searching...
No Matches
AosTraits::Approximate_2 Class Reference

#include <Concepts/AosTraits--Approximate_2.h>

Definition

Operations

A model of this concept must provide:

CGAL::Approximate_number_type operator() (AosTraits::Point_2 p, int i)
 obtains an approximation of p's \(x\)-coordinate (if i == 0), or of p's \(y\)-coordinate (if i == 1).
 
CGAL::Approximate_point_2 operator() (AosTraits::Point_2 p)
 obtains an approximation of p.
 
template<typename OutputIterator >
OutputIterator operator() (const X_monotone_curve_2 &xcv, double error, OutputIterator oi, bool l2r=true) const
 approximates a given \(x\)-monotone curve.
 

Member Function Documentation

◆ operator()() [1/3]

CGAL::Approximate_point_2 AosTraits::Approximate_2::operator() ( AosTraits::Point_2  p)

obtains an approximation of p.

◆ operator()() [2/3]

CGAL::Approximate_number_type AosTraits::Approximate_2::operator() ( AosTraits::Point_2  p,
int  i 
)

obtains an approximation of p's \(x\)-coordinate (if i == 0), or of p's \(y\)-coordinate (if i == 1).

Precondition
i is either 0 or 1.

◆ operator()() [3/3]

template<typename OutputIterator >
OutputIterator AosTraits::Approximate_2::operator() ( const X_monotone_curve_2 &  xcv,
double  error,
OutputIterator  oi,
bool  l2r = true 
) const

approximates a given \(x\)-monotone curve.

It computes a sequence of approximate points that represent an approximate polyline, and inserts them into an output container given through an output iterator. The first and last points in the sequence are always approximations of the endpoints of the given curve.

Parameters
xcvThe exact \(x\)-monotone curve.
errorThe error bound of the polyline approximation. This is the Hausdorff distance between the curve and the polyline that approximates the curve.
oiAn output iterator for the output container.
l2rA Boolean flag that indicates whether the curve direction is left to right.
Returns
The past-the-end iterator of the output container.
Precondition
Dereferencing oi must yield an object of type Arr_conic_traits_2::Approximate_point_2.