ShapeUnion

class ShapeUnion : public feasst::Shape

Represents the union of two shapes. The union of two shapes is the region that is inside either shape. This is done by returning the smallest value of the nearest distance.

Public Functions

bool is_inside(const Position &point) const

Return true if the point is inside of the shape.

bool is_inside(const Position &point, const double diameter) const

Return true if the sphere of given center point and diameter is entirely inside of the shape.

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.