Definition
An instance of the data type d3_sphere is an oriented sphere in 3d space. The sphere is defined by four points p1,p2,p3,p4 (d3_points).
#include < LEDA/d3 _sphere.h >
Creation
d3_sphere | S(d3_point p1, d3_point p2, d3_point p3, d3_point p4) | |
introduces a variable S of type d3_sphere. S is initialized to the sphere through points p1,p2,p3,p4. |
Operations
bool | S.contains(d3_point p) | returns true, if p is on the sphere, false otherwise. |
bool | S.inside(d3_point p) | returns true, if p is inside the sphere, false otherwise. |
bool | S.outside(d3_point p) | returns true, if p is outside the sphere, false otherwise. |
d3_point | S.point1() | returns p1. |
d3_point | S.point2() | returns p2. |
d3_point | S.point3() | returns p3. |
d3_point | S.point4() | returns p4. |
bool | S.is_degenerate() | returns true, if the 4 defining points are coplanar. |
d3_point | S.center() | returns the center of the sphere. |
double | S.sqr_radius() | returns the square of the radius. |
double | S.radius() | returns the radius. |
double | S.surface() | returns the size of the surface. |
double | S.volume() | returns the volume of the sphere. |
d3_sphere | S.translate(vector v) | returns S translated by vector v. |
d3_sphere | S.translate(double dx, double dy, double dz) | |
returns S translated by vector (dx,dy,dz). |