Contents

generateCylinder(height:radius:)

Creates a new cylinder mesh with the specified dimensions.

Declaration

@MainActor @preconcurrency static func generateCylinder(height: Float, radius: Float) -> MeshResource

Parameters

  • height:

    The height of the cylinder, in meters, along the y-axis.

  • radius:

    The radius of the cylinder, in meters.

Discussion

The cylinder is centered at the local origin with its axis aligned along the y-axis.

See Also

Creating a primitive shape