CGAL::Circle_3<Kernel>

Definition

An object of type Circle_3<Kernel> is a circle in the three-dimensional Euclidean space 3. Note that the circle can be degenerate, i.e. the squared radius may be zero.

Creation

Circle_3<Kernel> c ( Point_3<Kernel> center, Kernel::FT sq_r, Plane_3<Kernel> plane);
introduces a variable c of type Circle_3<Kernel>. It is initialized to the circle of center center and squared radius sq_r in plane plane.
Precondition: center lies in plane and sq_r 0.


Circle_3<Kernel> c ( Point_3<Kernel> center, Kernel::FT sq_r, Vector_3<Kernel> n);
introduces a variable c of type Circle_3<Kernel>. It is initialized to the circle of center center and squared radius sq_r in a plane normal to the vector n.
Precondition: sq_r 0.


Circle_3<Kernel> c ( Point_3<Kernel> p, Point_3<Kernel> q, Point_3<Kernel> r);
introduces a variable c of type Circle_3<Kernel>. It is initialized to the circle passing through the three points.
Precondition: The three points are not collinear.


Circle_3<Kernel> c ( Sphere_3<Kernel> sphere1, Sphere_3<Kernel> sphere2);
introduces a variable c of type Circle_3<Kernel>. It is initialized to the circle along which the two spheres intersect.
Precondition: The two spheres intersect along a circle.


Circle_3<Kernel> c ( Sphere_3<Kernel> sphere, Plane_3<Kernel> plane);
introduces a variable c of type Circle_3<Kernel>. It is initialized to the circle along which the sphere and the plane intersect.
Precondition: The sphere and the plane intersect along a circle.


Circle_3<Kernel> c ( Plane_3<Kernel> plane, Sphere_3<Kernel> sphere);
introduces a variable c of type Circle_3<Kernel>. It is initialized to the circle along which the sphere and the plane intersect.
Precondition: The sphere and the plane intersect along a circle.

Access Functions

Point_3<Kernel> c.center () const returns the center of c.
Kernel::FT c.squared_radius () const returns the squared radius of c.
Plane_3<Kernel> c.supporting_plane () const returns the supporting plane of c.
Sphere_3<Kernel> c.diametral_sphere () const returns the diametral sphere of c.

Kernel::FT c.area_divided_by_pi () const returns the area of c, divided by π.
double c.approximate_area () const returns an approximation of the area of c.
Kernel::FT c.squared_length_divided_by_pi_square () const
returns the squared length of c, divided by π2.
double c.approximate_squared_length () const
returns an approximation of the squared length (i.e. perimeter) of c.

Predicates

bool c.has_on ( Point_3<Kernel> p) const

Operations

bool operator == ( c1, c2) returns true, iff c1 and c2 are equal, i.e. if they have the same center, the same squared radius and the same supporting plane.

bool operator != ( c1, c2)

Bbox_3 c.bbox () const returns a bounding box containing c.

See Also

Kernel::Circle_3