CGAL 5.6 - 2D Arrangements
|
#include <CGAL/Arr_conic_traits_2.h>
The Curve_2
class nested within the conic-arc traits can represent arbitrary conic arcs and support their construction in various ways.
The copy and default constructor as well as the assignment operator are provided for conic arcs. In addition, an operator<<
for the curves is defined for standard output streams.
Creation | |
Curve_2 () | |
constructs an empty (invalid) arc. | |
Access Functions | |
bool | is_valid () const |
indicates whether a is a valid conic arc. | |
bool | is_x_monotone () const |
determines whether the arc is \(x\)-monotone, namely each vertical line intersects it at most once. | |
bool | is_y_monotone () const |
determines whether the arc is \(y\)-monotone, namely each horizontal line intersects it at most once. | |
bool | is_full_conic () const |
indicates whether the arc represents a full conic curve (en ellipse or a circle). | |
The six following methods return the coefficients of the supported conic, after their conversion to integer number (represented by the | |
const NtTraits::Integer & | r () const |
returns the coefficient of \(x^2\). | |
const NtTraits::Integer & | s () const |
returns the coefficient of \(t^2\). | |
const NtTraits::Integer & | t () const |
returns the coefficient of \(x y\). | |
const NtTraits::Integer & | u () const |
returns the coefficient of \(x\). | |
const NtTraits::Integer & | v () const |
returns the coefficient of \(y\). | |
const NtTraits::Integer & | w () const |
returns the free coefficient. | |
const Point_2 & | source () const |
returns the source point of the arc. | |
const Point_2 & | target () const |
returns the target point of the arc. | |
Orientation | orientation () const |
returns the orientation of the arc. | |
Operations | |
void | set_source (const Point_2 &ps) |
sets a new source point for the conic arc. | |
void | set_target (const Point_2 &pt) |
sets a new target point for the conic arc. | |
bool CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::is_valid | ( | ) | const |
indicates whether a
is a valid conic arc.
As the precondition to some of the constructor listed above are quite complicated, their violation does not cause the program to abort. Instead, the constructed arc is invalid (a defaultly constructed arc is also invalid). It is however recommended to check that a constructed arc is valid before inserting it to an arrangement.
bool CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::is_x_monotone | ( | ) | const |
determines whether the arc is \(x\)-monotone, namely each vertical line intersects it at most once.
A vertical line segment is also considered (weakly) \(x\)-monotone.
bool CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::is_y_monotone | ( | ) | const |
determines whether the arc is \(y\)-monotone, namely each horizontal line intersects it at most once.
A horizontal line segment is also considered (weakly) \(x\)-monotone.
void CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::set_source | ( | const Point_2 & | ps | ) |
sets a new source point for the conic arc.
ps
lies on the supporting conic of a
. void CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::set_target | ( | const Point_2 & | pt | ) |
sets a new target point for the conic arc.
pt
lies on the supporting conic of a
. const Point_2 & CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::source | ( | ) | const |
returns the source point of the arc.
a
is not a full conic curve. const Point_2 & CGAL::Arr_conic_traits_2< RatKernel, AlgKernel, NtTraits >::Curve_2::target | ( | ) | const |
returns the target point of the arc.
a
is not a full conic curve.