cylinder

fun cylinder(radius: Float, height: Float, slices: Int = 16): Mesh

Generates a cylinder mesh.

Return

The generated mesh.

Parameters

radius

The radius of the cylinder.

height

The height of the cylinder.

slices

The number of slices of the cylinder. Increasing the number of slices increases the number of subdivisions around the main axis, which improves the cylinder's roundness.