Navigation: Up, Table of Contents, Bibliography, Index, Title Page

2D Optimisation Circle (CGAL_Optimisation_circle_2)

Definition

An object of the class CGAL_Optimisation_circle_2<R> is a circle in the two-dimensional Euclidean plane E2. Its boundary splits E2 into a bounded and an unbounded side. Note that the circle can be degenerated, i.e. it can be empty or contain only a single point. By definition, an empty CGAL_Optimisation_circle_2<R> has no boundary and no bounded side, i.e. its unbounded side equals the whole plane E2. A CGAL_Optimisation_circle_2<R> containing exactly one point p has no bounded side, its boundary is {p}, and its unbounded side equals E2-{p}.

#include <CGAL/Optimisation_circle_2.h>

Types

typedef CGAL_Point_2<R>
Point; Point type.
typedef R::FT Distance; Distance type.

Creation

void circle.set () sets circle to the empty circle.
void circle.set ( CGAL_Point_2<R> p)
sets circle to the circle containing exactly p.
void circle.set ( CGAL_Point_2<R> p, CGAL_Point_2<R> q)
sets circle to the circle with diameter equal to the segment connecting p and q.
Precondition: p and q are distinct.
void
circle.set ( CGAL_Point_2<R> p,
CGAL_Point_2<R> q,
CGAL_Point_2<R> r)
sets circle to the unique circle through p,q, r.
Precondition: p,q, r are not collinear.
void
circle.set ( CGAL_Point_2<R> center,
R::FT squared_radius)
sets circle to the circle with center center and squared radius squared_radius.

Access Functions

CGAL_Point_2<R> circle.center () returns the center of circle.
R::FT circle.squared_radius ()
returns the squared radius of circle.

Equality Tests

bool circle == circle2 returns true, iff circle and circle2 are equal, i.e. if they have the same center and same squared radius.
bool circle != circle2 returns true, iff circle and circle2 are not equal.

Predicates

CGAL_Bounded_side circle.bounded_side ( CGAL_Point_2<R> p)
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.
bool circle.has_on_bounded_side ( CGAL_Point_2<R> p)
returns true, iff p lies properly inside circle.
bool circle.has_on_boundary ( CGAL_Point_2<R> p)
returns true, iff p lies on the boundary of circle.
bool circle.has_on_unbounded_side ( CGAL_Point_2<R> p)
returns true, iff p lies properly outside of circle.
bool circle.is_empty () returns true, iff circle is empty (this implies degeneracy).
bool circle.is_degenerate ()
returns true, iff circleis degenerate, i.e. if circle is empty or equal to a single point.

I/O

ostream& ostream& os << circle
writes circle to output stream os.
istream& istream& is >> & circle
reads circle from input stream is.

#include <CGAL/IO/Window_stream.h>

CGAL_Window_stream&
CGAL_Window_stream& ws << circle
writes circle to window stream ws.


Next: Class declaration of CGAL_Min_circle_2_traits_2<R>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. 22 January, 1999.