The class template CGAL_Min_circle_2 is parameterized with a Traits class which defines the abstract interface between the optimisation algorithm and the primitives it uses. The following requirements catalog lists the primitives, i.e. types, member functions etc., that must be defined for a class that can be used to parameterize CGAL_Min_circle_2. A traits class implementation using the CGAL 2D kernel is available and described in Section . In addition, we provide traits class adapters to user supplied point classes, see Sections and . Both, the implementation and the adapters, can be used as a starting point for customizing own traits classes, e.g. through derivation and specialization.
| |
The point type must provide default and copy constructor,
assignment and equality test.
| |
| |
The circle type must fulfill the requirements listed below in the
next section.
|
In addition, if I/O is used, the corresponding I/O operators for Point and Circle have to be provided, see topic I/O in Section .
|
| The actual circle. This variable is maintained by the algorithm, the user should neither access nor modify it directly. |
Only default and copy constructor are required. Note that further constructors can be provided.
| |
A default constructor.
| |
| |
A copy constructor.
|
|
| |
returns constants CGAL_LEFTTURN, CGAL_COLLINEAR, or CGAL_RIGHTTURN iff r lies properly to the left, on, or properly to the right of the oriented line through p and q, resp. |
| |
Point type.
|
The following type is only needed, if the member function is_valid of CGAL_Min_circle_2 is used.
| |
Distance type. The function squared_radius (see below)
returns an object of this type.
|
|
| sets circle to the empty circle. |
|
| |
sets circle to the circle containing exactly p. | ||
|
| |
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. | ||
|
| |
sets circle to the circle through p,q,r . The algorithm guarantees that set is never called with three collinear points. |
|
| |
returns true, iff p lies properly outside of circle. |
Each of the following predicates is only needed, if the corresponding predicate of CGAL_Min_circle_2 is used.
|
| |
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. | ||
|
| |
returns true, iff p lies properly inside circle. | ||
|
| |
returns true, iff p lies on the boundary of circle. | ||
|
| returns true, iff circle is empty (this implies degeneracy). |
|
| |
returns true, iff circle is degenerate, i.e. if circle is empty or equal to a single point. |
The following operations are only needed, if the member function is_valid of CGAL_Min_circle_2 is used.
|
| returns true, iff circle and circle2 are equal. |
|
| returns the center of circle. |
|
| |
returns the squared radius of circle. |
The following I/O operators are only needed, if the corresponding I/O operators of CGAL_Min_circle_2 are used.
|
| |
writes circle to output stream os. | ||
| ||
| ||
writes circle to window stream ws. |