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

2D Optimisation Circle (Optimisation_circle_2)

Definition

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

#include <CGAL/Optimisation_circle_2.h>

Types

typedef 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 ( Point_2<R> p)
sets circle to the circle equal to the single point p.

void circle.set ( Point_2<R> p, 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 ( Point_2<R> p, Point_2<R> q, Point_2<R> r)
sets circle to the unique circle through p,q,r.
Precondition: p,q,r are not collinear.

void circle.set ( Point_2<R> center, R::FT squared_radius)
sets circle to the circle with center center and squared radius squared_radius.

Access Functions

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

Bounded_side circle.bounded_side ( Point_2<R> p)
returns ON_BOUNDED_SIDE, ON_BOUNDARY, or ON_UNBOUNDED_SIDE iff p lies properly inside, on the boundary of, or properly outside of circle, resp.

bool circle.has_on_bounded_side ( Point_2<R> p)
returns true, iff p lies properly inside circle.

bool circle.has_on_boundary ( Point_2<R> p)
returns true, iff p lies on the boundary of circle.

bool circle.has_on_unbounded_side ( 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 circle is 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>

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


Next: Class declaration of Min_circle_2_traits_2<R>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The GALIA project. Jan 18, 2000.