CGAL 5.6 - 2D Arrangements
|
#include <CGAL/Arr_Bezier_curve_traits_2.h>
The Curve_2
class nested within the Bézier traits class is used to represent a Bézier curve of arbitrary degree, which is defined by a sequence of rational control points.
In addition to the methods listed below, the I/O operators operator<<
and operator>>
for standard output-streams are also supported. The copy constructor and assignment operator are supported as well.
Creation | |
Curve_2 () | |
default constructor. | |
template<class InputIterator > | |
Curve_2 (InputIterator pts_begin, InputIterator pts_end) | |
constructs a Bézier curve as defined by the given range of control points. More... | |
Access Functions | |
size_t | number_of_control_points () const |
returns the number of control points that define B . | |
RatKernel::Point_2 | control_point (size_t k) const |
returns the \( k\)th control point. More... | |
RatKernel::Point_2 | operator() (const Rational &t) const |
returns the point \( B(t)\) on the curve that corresponds to the given rational parameter value. | |
AlgKernel::Point_2 | operator() (const Algebraic &t) const |
returns the point \( B(t)\) on the curve that corresponds to the given algebraic parameter value. | |
CGAL::Arr_Bezier_curve_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::Curve_2 | ( | InputIterator | pts_begin, |
InputIterator | pts_end | ||
) |
constructs a Bézier curve as defined by the given range of control points.
The value-type of InputIterator
is RatKernel::Point_2
.
RatKernel::Point_2 CGAL::Arr_Bezier_curve_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::control_point | ( | size_t | k | ) | const |
returns the \( k\)th control point.
Note that the first control point equals the curve source, while the last control point equals its target. The rest of the control points do not lie on the curve.