CGAL 5.0.2 - 2D Arrangements
|
#include <CGAL/Arr_circle_segment_traits_2.h>
The Curve_2
class nested within the traits class can represent arbitrary circular arcs, full circles and line segments and support their construction in various ways.
The copy and default constructor as well as the assignment operator are provided. In addition, an operator<<
for the curves is defined for standard output streams.
Creation | |
Curve_2 (const typename Kernel::Segment_2 &seg) | |
constructs an curve corresponding to the line segment seg . | |
Curve_2 (const typename Kernel::Point_2 &source, const typename Kernel::Point_2 &target) | |
constructs an curve corresponding to the line segment directed from source to target , both having rational coordinates. | |
Curve_2 (const typename Kernel::Line_2 &line, const Point_2 &source, const Point_2 &target) | |
constructs an curve corresponding to the line segment supported by the given line, directed from source to target . More... | |
Curve_2 (const typename Kernel::Circle_2 &circ) | |
constructs an curve corresponding to the given circle. More... | |
Curve_2 (const typename Kernel::Point_2 &c, const typename Kernel::FT &r, Orientation orient=COUNTERCLOCKWISE) | |
constructs an curve corresponding to a circle centered at the rational point c whose radius r is rational. | |
Curve_2 (const typename Kernel::Circle_2 &circ, const Point_2 &source, const Point_2 &target) | |
constructs a circular arc supported by circ , which has a center point with rational coordinates and whose squared radius is rational, with the given endpoints. More... | |
Curve_2 (const typename Kernel::Point_2 &c, const typename Kernel::FT &r, Orientation orient, const Point_2 &source, const Point_2 &target) | |
constructs a circular arc supported by a circle centered at the rational point c whose radius r is rational, directed from source to target with the given orientation. More... | |
Curve_2 (const typename Kernel::Point_2 &source, const typename Kernel::Point_2 &mid, const typename Kernel::Point_2 &target) | |
constructs an circular arc whose endpoints are source and target that passes through mid . More... | |
Access Functions | |
bool | is_full () const |
indicates whether the curve represents a full circle. | |
const Point_2 & | source () const |
returns the source point. More... | |
const Point_2 & | target () const |
returns the target point. More... | |
Orientation | orientation () const |
returns the orientation of the curve (COLLINEAR in case of line segments). | |
bool | is_linear () const |
determines whether cv is a line segment. | |
bool | is_circular () const |
determines whether cv is a circular arc. | |
Kernel::Line_2 | supporting_line () const |
returns the supporting line of cv . More... | |
Kernel::Circle_2 | supporting_circle () const |
returns the supporting circle of cv . More... | |
CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Line_2 & | line, |
const Point_2 & | source, | ||
const Point_2 & | target | ||
) |
constructs an curve corresponding to the line segment supported by the given line, directed from source
to target
.
Note that the two endpoints may have one-root coordinates.
CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Circle_2 & | circ | ) |
constructs an curve corresponding to the given circle.
circ
has a center point with rational coordinates and its squared radius is rational.
CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Circle_2 & | circ, |
const Point_2 & | source, | ||
const Point_2 & | target | ||
) |
constructs a circular arc supported by circ
, which has a center point with rational coordinates and whose squared radius is rational, with the given endpoints.
The orientation of the arc is the same as the orientation of circ
.
CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Point_2 & | c, |
const typename Kernel::FT & | r, | ||
Orientation | orient, | ||
const Point_2 & | source, | ||
const Point_2 & | target | ||
) |
constructs a circular arc supported by a circle centered at the rational point c
whose radius r
is rational, directed from source
to target
with the given orientation.
CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::Curve_2 | ( | const typename Kernel::Point_2 & | source, |
const typename Kernel::Point_2 & | mid, | ||
const typename Kernel::Point_2 & | target | ||
) |
constructs an circular arc whose endpoints are source
and target
that passes through mid
.
All three points have rational coordinates.
const Point_2& CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::source | ( | ) | const |
returns the source point.
cv
is not a full circle. Kernel::Circle_2 CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::supporting_circle | ( | ) | const |
returns the supporting circle of cv
.
cv
is a circular arc. Kernel::Line_2 CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::supporting_line | ( | ) | const |
returns the supporting line of cv
.
cv
is a line segment. const Point_2& CGAL::Arr_circle_segment_traits_2< Kernel >::Curve_2::target | ( | ) | const |
returns the target point.
cv
is not a full circle.