CGAL 6.0 - 2D Arrangements
|
#include <CGAL/Arr_Bezier_curve_traits_2.h>
The Point_2
class nested within the Bézier traits class is used to represent: (i) an endpoint of a Bézier curve, (ii) a vertical tangency point of a curve, used to subdivide it into \( x\)-monotone subcurve, and (iii) an intersection point between two curves.
While, points of type (i) have rational coordinates and are given as part of the input, points of the two latter types have algebraic coordinates. However, to speed up the arrangement construction, such point are not computed in an exact manner, and instead are given in an approximate representation. Note that the exact coordinates of a point may only be accessed if it is exactly computed.
In addition to the methods listed below, the copy constructor and assignment operator for Point_2
objects are also supported.
Creation | |
Point_2 () | |
default constructor. | |
Point_2 (const Curve_2 &B, const Algebraic &t_0) | |
constructs the point \( B(t_0)\) on the given curve. | |
Point_2 (const Curve_2 &B, const Rational &t_0) | |
constructs the point \( B(t_0)\) on the given curve. | |
Access Functions | |
std::pair< double, double > | approximate () const |
returns the approximated coordinates of p . | |
bool | is_exact () const |
returns whether the coordinates of p are computed in an exact manner. | |
Algebraic | x () const |
returns the \( x\)-coordinate of p . | |
Algebraic | y () const |
returns the \( y\)-coordinate of p . | |
bool | is_rational () const |
returns whether the coordinates of p are rational numbers. | |
operator typename RatKernel::Point_2 () const | |
casts p to a point with rational coordinates. | |
CGAL::Arr_Bezier_curve_traits_2< RatKernel, AlgKernel, NtTraits >::Point_2::Point_2 | ( | const Curve_2 & | B, |
const Algebraic & | t_0 | ||
) |
constructs the point \( B(t_0)\) on the given curve.
As \( t_0\) is an algebraic number, the point has algebraic coordinates.
CGAL::Arr_Bezier_curve_traits_2< RatKernel, AlgKernel, NtTraits >::Point_2::Point_2 | ( | const Curve_2 & | B, |
const Rational & | t_0 | ||
) |
constructs the point \( B(t_0)\) on the given curve.
As \( t_0\) is a rational number, the point has rational coordinates.
CGAL::Arr_Bezier_curve_traits_2< RatKernel, AlgKernel, NtTraits >::Point_2::operator typename RatKernel::Point_2 | ( | ) | const |
casts p
to a point with rational coordinates.
p
has rational coordinates. Algebraic CGAL::Arr_Bezier_curve_traits_2< RatKernel, AlgKernel, NtTraits >::Point_2::x | ( | ) | const |
returns the \( x\)-coordinate of p
.
p
is exactly computed. Algebraic CGAL::Arr_Bezier_curve_traits_2< RatKernel, AlgKernel, NtTraits >::Point_2::y | ( | ) | const |
returns the \( y\)-coordinate of p
.
p
is exactly computed.