class Sphere : public feasst::Shape
A sphere is given by a center point and a radius.
Sphere(argtype args = argtype())
radius: Set the radius of the sphere (default: 1).
center: set the unique key for the center positions. Thus, arguments of “key[i]” are expected to follow. The “[i]” is to be substituted for integer dimensions 0, 1, 2, … The “[i]” are also expected to be in order, starting from 0. If center arg is not used, a three dimensional origin is assumed.
double nearest_distance(const Position &point) const
Return the distance from the point to the nearest point on the surface. The distance is negative if the point is inside of the shape and positive if it is outside.
double surface_area() const
Return the surface area (if implemented).
double volume() const
Return the volume (if implemented).
- Sphere(argtype args = argtype())