CGAL 5.1 - 2D Circular Geometry Kernel
CGAL::Circular_arc_2< CircularKernel > Class Template Reference

#include <CGAL/Circular_arc_2.h>

Definition

Related Functions

(Note that these are not member functions.)

bool operator== (const Circular_arc_2< CircularKernel > &ca1, const Circular_arc_2< CircularKernel > &ca2)
 Test for equality. More...
 
bool operator!= (const Circular_arc_2< CircularKernel > &ca1, const Circular_arc_2< CircularKernel > &ca2)
 Test for non-equality. More...
 
istream & operator>> (std::istream &is, Circular_arc_2 &ca)
 
ostream & operator<< (std::ostream &os, const Circular_arc_2 &ca)
 

Creation

 Circular_arc_2 (const Circle_2< CircularKernel > &c)
 Constructs an arc from a full circle. More...
 
 Circular_arc_2 (const Circle_2< CircularKernel > &c, const Circular_arc_point_2< CircularKernel > &p, const Circular_arc_point_2< CircularKernel > &q)
 Constructs the circular arc supported by c, whose source is p and whose target is q when traversing the circle in counterclockwise direction. More...
 
 Circular_arc_2 (const Point_2< CircularKernel > &p, const Point_2< CircularKernel > &q, const Point_2< CircularKernel > &r)
 Constructs an arc that is supported by the circle of type Circle_2<CircularKernel> passing through the points p, q and r. More...
 

Access Functions

Circle_2< CircularKernelsupporting_circle ()
 
Point_2< CircularKernel > const & center () const
 returns the center of the supporting circle. More...
 
CircularKernel::FT const & squared_radius () const
 returns the squared radius of the supporting circle. More...
 

A circular arc is not oriented.

Still, its source and target endpoints can be defined, supposing that its supporting circle in traversed the counterclockwise direction from source to target.

Circular_arc_point_2< CircularKernelsource ()
 
Circular_arc_point_2< CircularKerneltarget ()
 

When the methods source and target return the same point, then the arc is in fact a full circle.

When an arc is x-monotone, its left and right points can be accessed directly:

Circular_arc_point_2< CircularKernelleft ()
 
Circular_arc_point_2< CircularKernelright ()
 
Bbox_2 bbox () const
 Returns a bounding box containing the arc. More...
 

Query Functions

bool is_x_monotone ()
 Tests whether the arc is x-monotone. More...
 
bool is_y_monotone ()
 Tests whether the arc is y-monotone. More...
 

Constructor & Destructor Documentation

◆ Circular_arc_2() [1/3]

template<typename CircularKernel >
CGAL::Circular_arc_2< CircularKernel >::Circular_arc_2 ( const Circle_2< CircularKernel > &  c)

Constructs an arc from a full circle.

◆ Circular_arc_2() [2/3]

template<typename CircularKernel >
CGAL::Circular_arc_2< CircularKernel >::Circular_arc_2 ( const Circle_2< CircularKernel > &  c,
const Circular_arc_point_2< CircularKernel > &  p,
const Circular_arc_point_2< CircularKernel > &  q 
)

Constructs the circular arc supported by c, whose source is p and whose target is q when traversing the circle in counterclockwise direction.

Precondition
p and q lie on c.

◆ Circular_arc_2() [3/3]

template<typename CircularKernel >
CGAL::Circular_arc_2< CircularKernel >::Circular_arc_2 ( const Point_2< CircularKernel > &  p,
const Point_2< CircularKernel > &  q,
const Point_2< CircularKernel > &  r 
)

Constructs an arc that is supported by the circle of type Circle_2<CircularKernel> passing through the points p, q and r.

The source and target are respectively p and r, when traversing the supporting circle in the counterclockwise direction. Note that, depending on the orientation of the point triple (p,q,r), q may not lie on the arc.

Precondition
p, q, and r are not collinear.

Member Function Documentation

◆ bbox()

template<typename CircularKernel >
Bbox_2 CGAL::Circular_arc_2< CircularKernel >::bbox ( ) const

Returns a bounding box containing the arc.

◆ center()

template<typename CircularKernel >
Point_2<CircularKernel> const& CGAL::Circular_arc_2< CircularKernel >::center ( ) const

returns the center of the supporting circle.

◆ is_x_monotone()

template<typename CircularKernel >
bool CGAL::Circular_arc_2< CircularKernel >::is_x_monotone ( )

Tests whether the arc is x-monotone.

◆ is_y_monotone()

template<typename CircularKernel >
bool CGAL::Circular_arc_2< CircularKernel >::is_y_monotone ( )

Tests whether the arc is y-monotone.

◆ left()

template<typename CircularKernel >
Circular_arc_point_2<CircularKernel> CGAL::Circular_arc_2< CircularKernel >::left ( )
Precondition
ca.is_x_monotone().

◆ right()

template<typename CircularKernel >
Circular_arc_point_2<CircularKernel> CGAL::Circular_arc_2< CircularKernel >::right ( )
Precondition
ca.is_x_monotone().

◆ source()

template<typename CircularKernel >
Circular_arc_point_2<CircularKernel> CGAL::Circular_arc_2< CircularKernel >::source ( )

◆ squared_radius()

template<typename CircularKernel >
CircularKernel::FT const& CGAL::Circular_arc_2< CircularKernel >::squared_radius ( ) const

returns the squared radius of the supporting circle.

◆ supporting_circle()

template<typename CircularKernel >
Circle_2<CircularKernel> CGAL::Circular_arc_2< CircularKernel >::supporting_circle ( )

◆ target()

template<typename CircularKernel >
Circular_arc_point_2<CircularKernel> CGAL::Circular_arc_2< CircularKernel >::target ( )

Friends And Related Function Documentation

◆ operator!=()

template<typename CircularKernel >
bool operator!= ( const Circular_arc_2< CircularKernel > &  ca1,
const Circular_arc_2< CircularKernel > &  ca2 
)
related

Test for non-equality.

◆ operator<<()

template<typename CircularKernel >
ostream & operator<< ( std::ostream &  os,
const Circular_arc_2< CircularKernel > &  ca 
)
related

◆ operator==()

template<typename CircularKernel >
bool operator== ( const Circular_arc_2< CircularKernel > &  ca1,
const Circular_arc_2< CircularKernel > &  ca2 
)
related

Test for equality.

Two arcs are equal, iff their non-oriented supporting circles are equal (i.e. they have same center and same squared radius) and their endpoints are equal.

◆ operator>>()

template<typename CircularKernel >
istream & operator>> ( std::istream &  is,
Circular_arc_2< CircularKernel > &  ca 
)
related