CylinderTriangulatorCompute Method (Double, Double, Double, Int32, CylinderFill) |
Computes the triangulation for a cylinder centered at the origin.
Namespace:
AGI.Foundation.Geometry.Discrete
Assembly:
AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 25.2.423.0 (25.2.423.0)
Syntaxpublic static SolidTriangulatorResult Compute(
double length,
double bottomRadius,
double topRadius,
int slices,
CylinderFill cylinderFill
)
Public Shared Function Compute (
length As Double,
bottomRadius As Double,
topRadius As Double,
slices As Integer,
cylinderFill As CylinderFill
) As SolidTriangulatorResult
public:
static SolidTriangulatorResult^ Compute(
double length,
double bottomRadius,
double topRadius,
int slices,
CylinderFill cylinderFill
)
static member Compute :
length : float *
bottomRadius : float *
topRadius : float *
slices : int *
cylinderFill : CylinderFill -> SolidTriangulatorResult
Parameters
- length
- Type: SystemDouble
The length of the cylinder along the z axis. - bottomRadius
- Type: SystemDouble
The radius of the cylinder's bottom cap. - topRadius
- Type: SystemDouble
The radius of the cylinder's top cap. - slices
- Type: SystemInt32
The number of slices around the z axis. - cylinderFill
- Type: AGI.Foundation.Geometry.DiscreteCylinderFill
Flags enumeration indicating what cylinder faces should be filled. Values can be logically ored together.
Return Value
Type:
SolidTriangulatorResultA
SolidTriangulatorResult object representing the triangulation.
Exceptions| 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.
|
Remarksslices 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.
See Also