public final class CylinderTriangulator extends Object
SolidPrimitive
.
Although, if only the fill is desired for visualization, a
TriangleMeshPrimitive
with
RenderBackThenFrontFaces (get
) set
to true
can be used. Likewise, if only the outline is desired, a
PolylinePrimitive
can be used.
Solid Primitive topicModifier and Type | Method and Description |
---|---|
static SolidTriangulatorResult |
compute(double length,
double radius)
Computes the triangulation for a cylinder centered at the origin.
|
static SolidTriangulatorResult |
compute(double length,
double bottomRadius,
double topRadius,
int slices,
CylinderFill cylinderFill)
Computes the triangulation for a cylinder centered at the origin.
|
public static final SolidTriangulatorResult compute(double length, double radius)
length
- The length, in meters, of the cylinder along the z axis.radius
- The radius, in meters, of the cylinder.SolidTriangulatorResult
object representing the triangulation.system.ArgumentOutOfRangeException
- length must be greater than or equal to 0
.system.ArgumentOutOfRangeException
- radius must be greater than 0
.public static final SolidTriangulatorResult compute(double length, double bottomRadius, double topRadius, int slices, CylinderFill cylinderFill)
length
- The length, in meters, of the cylinder along the z axis.bottomRadius
- The radius, in meters, of the cylinder's bottom cap.topRadius
- The radius, in meters, of the cylinder's top cap.slices
- The number of slices around the z axis.cylinderFill
- Flags enumeration indicating what cylinder faces should be filled. Values can be logically or
ed together.SolidTriangulatorResult
object representing the triangulation.system.ArgumentOutOfRangeException
- length must be greater than or equal to 0
.system.ArgumentOutOfRangeException
- bottomRadius and topRadius must be greater than or equal to 0
. Both cannot equal 0
.system.ArgumentOutOfRangeException
- slices must be greater than or equal to 3
.UnsupportedCaseException
- cylinderFill must be a valid enumeration value in
CylinderFill
.
A wide variety of shapes can be created using