CGAL 5.6.2 - Bounding Volumes
Circle Concept Reference

Definition

An object circle of the class Circle is a circle in the two-dimensional Euclidean plane \( \E^2\). Its boundary splits the plane into a bounded and an unbounded side. By definition, an empty circle has no boundary and no bounded side, i.e. its unbounded side equals the whole plane \( \E^2\). A circle containing exactly one point \( p\) has no bounded side, its boundary is \( \{p\}\), and its unbounded side equals \( \E^2 \setminus \{p\}\).

Types

typedef unspecified_type Point
 Point type.
 
typedef unspecified_type Distance
 Distance type. More...
 

Creation

void set ()
 sets circle to the empty circle.
 
void set (const Point &p)
 sets circle to the circle containing exactly p.
 
void set (const Point &p, const Point &q)
 sets circle to the circle with diameter equal to the segment connecting p and q. More...
 
void set (const Point &p, const Point &q, const Point &r)
 sets circle to the circle through p, q, and r. More...
 

Predicates

bool has_on_unbounded_side (const Point &p) const
 returns true, iff p lies properly outside of circle.
 
CGAL::Bounded_side bounded_side (const Point &p) const
 returns CGAL::ON_BOUNDED_SIDE, CGAL::ON_BOUNDARY, or CGAL::ON_UNBOUNDED_SIDE iff p lies properly inside, on the boundary, or properly outside of circle, resp. More...
 
bool has_on_bounded_side (const Point &p) const
 returns true, iff p lies properly inside circle. More...
 
bool has_on_boundary (const Point &p) const
 returns true, iff p lies on the boundary of circle. More...
 
bool is_empty () const
 returns true, iff circle is empty (this implies degeneracy). More...
 
bool is_degenerate () const
 returns true, iff circle is degenerate, i.e. if circle is empty or equal to a single point. More...
 

Additional Operations for Checking

bool operator== (const Circle &circle2) const
 returns true, iff circle and circle2 are equal. More...
 
Point center () const
 returns the center of circle. More...
 
Distance squared_radius () const
 returns the squared radius of circle. More...
 

I/O

std::ostream & operator<< (std::ostream &os, const Circle &circle)
 writes circle to output stream os.
 

Member Typedef Documentation

◆ Distance

Distance type.

The function squared_radius() (see below) returns an object of this type.

Note
Only needed, if the member function is_valid() of Min_circle_2 is used.

Member Function Documentation

◆ bounded_side()

CGAL::Bounded_side Circle::bounded_side ( const Point p) const

returns CGAL::ON_BOUNDED_SIDE, CGAL::ON_BOUNDARY, or CGAL::ON_UNBOUNDED_SIDE iff p lies properly inside, on the boundary, or properly outside of circle, resp.

Note
Only needed, if the corresponding predicate of Min_circle_2 is used.

◆ center()

Point Circle::center ( ) const

returns the center of circle.

Note
Only needed, if the member function is_valid() of Min_circle_2 is used.

◆ has_on_boundary()

bool Circle::has_on_boundary ( const Point p) const

returns true, iff p lies on the boundary of circle.

Note
Only needed, if the corresponding predicate of Min_circle_2 is used.

◆ has_on_bounded_side()

bool Circle::has_on_bounded_side ( const Point p) const

returns true, iff p lies properly inside circle.

Note
Only needed, if the corresponding predicate of Min_circle_2 is used.

◆ is_degenerate()

bool Circle::is_degenerate ( ) const

returns true, iff circle is degenerate, i.e. if circle is empty or equal to a single point.

Note
Only needed, if the corresponding predicate of Min_circle_2 is used.

◆ is_empty()

bool Circle::is_empty ( ) const

returns true, iff circle is empty (this implies degeneracy).

Note
Only needed, if the corresponding predicate of Min_circle_2 is used.

◆ operator==()

bool Circle::operator== ( const Circle circle2) const

returns true, iff circle and circle2 are equal.

Note
Only needed, if the member function is_valid() of Min_circle_2 is used.

◆ set() [1/2]

void Circle::set ( const Point p,
const Point q 
)

sets circle to the circle with diameter equal to the segment connecting p and q.

The algorithm guarantees that set() is never called with two equal points.

◆ set() [2/2]

void Circle::set ( const Point p,
const Point q,
const Point r 
)

sets circle to the circle through p, q, and r.

The algorithm guarantees that set() is never called with three collinear points.

◆ squared_radius()

Distance Circle::squared_radius ( ) const

returns the squared radius of circle.

Note
Only needed, if the member function is_valid() of Min_circle_2 is used.