CylinderTriangulatorCompute Method (Double, Double, Double, Int32, CylinderFill) |
Namespace: AGI.Foundation.Geometry.Discrete
public static SolidTriangulatorResult Compute( double length, double bottomRadius, double topRadius, int slices, CylinderFill cylinderFill )
Exception | Condition |
---|---|
ArgumentOutOfRangeException | length must be greater than or equal to 0. |
ArgumentOutOfRangeException | bottomRadius and topRadius must be greater than or equal to 0. Both cannot equal 0. |
ArgumentOutOfRangeException | slices must be greater than or equal to 3. |
UnsupportedCaseException | cylinderFill must be a valid enumeration value in CylinderFill. |
slices determines the detail of the triangulation. More slices results in a precise cylinder but uses more memory.
A wide variety of shapes can be created using bottomRadius, topRadius, and cylinderFill. A lamp shade is created when bottomRadius is different than topRadius. When one radii is zero, a cone is created. When cylinderFill does not include Wall, one or two circles aligned to the xy plane are created.