class Cylinder : public feasst::Shape

A cylinder is given by an axis of rotational symmetry and a radius. The axis is described by two points.

Public Functions

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.


  • radius: radius of the cylinder.

  • first_point: set the unique key for the first_point 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.

  • second_point: as described for first_point.