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> const& center, Kernel::FT const& sq_r, Plane_3<Kernel> const& 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> const& center, Kernel::FT const& sq_r, Vector_3<Kernel> const& 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> const& p, Point_3<Kernel> const& q, Point_3<Kernel> const& 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> const& sphere1, Sphere_3<Kernel> const& 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> const& sphere, Plane_3<Kernel> const& 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> const& plane, Sphere_3<Kernel> const& 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> const& c.center () const returns the center of c.
Kernel::FT const& c.squared_radius () const returns the squared radius of c.
Plane_3<Kernel> const& c.supporting_plane () const returns the supporting plane of c.
Sphere_3<Kernel> const& c.diametral_sphere () const returns the diametral sphere of c.

Kernel::FT const& c.area_divided_by_pi () const returns the area of c, divided by π.
double const& c.approximate_area () const returns an approximation of the area of c.
Kernel::FT const& c.squared_length_divided_by_pi_square () const
returns the squared length of c, divided by π2.
double const& 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> const& p) const

Operations

bool operator == ( const& c1, const& 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 != ( const& c1, const& c2)

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

See Also

Kernel::Circle_3