Sphere

class Sphere : public feasst::Shape

A sphere is given by a center point and a radius.

Public Functions

Sphere(const argtype &args, const Position center)

Parameters
  • args: radius : Set the radius of the sphere.

  • center: position of the center of the sphere.

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.