cylinder(height:radius:withCaps:targetEdgeLength:)
Creates a cylinder mesh with a topology suitable for cloth simulation.
Declaration
@MainActor static func cylinder(height: Float, radius: Float, withCaps: Bool, targetEdgeLength: Float = defaultTargetEdgeLength) throws -> SelfReturn Value
The generated cylinder mesh resource.
Discussion
height: The height of the cylinder, in meters.
radius: The radius of the generated cylinder, in meters.
withCaps: If
true, the cylinder mesh will be fully closed with two flat caps; iffalse, the two extremes will be left open.targetEdgeLength: The targeted average edge length for the generated mesh, in meters. The generated mesh will contain edges with a length as close as possible to this.