capsule(height:radius:targetEdgeLength:)
Creates a capsule mesh with a topology suitable for cloth simulation.
Declaration
@MainActor static func capsule(height: Float, radius: Float, targetEdgeLength: Float = defaultTargetEdgeLength) throws -> SelfReturn Value
The generated capsule mesh resource.
Discussion
height: The height of the cylinder portion of the capsule, in meters. The total capsule height is
height + 2 * radius.radius: The radius of the body and the caps of the generated capsule, in meters.
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.