ShapeFile

class ShapeFile : public feasst::Shape

Build a Shape using a file with the following syntax. The first line describes a Shape by first listing its class_name, then its arguments, space-separated. The following lines then begin with either “union” or “intersect” and then another shape description as described for the first line.

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.

Arguments

  • shape_file: name of the file which describes the shape.