revolveMesh

fun revolveMesh(sides: Int, length: Double, envelope: List<Vector2> = listOf( Vector2(1.0, 0.0), Vector2(1.0, 1.0) )): VertexBuffer(source)

A shape created by rotating an envelope around a vertical axis.

Return

A vertex buffer containing the triangles to render the 3D shape

Parameters

sides

the angular resolution of the cap

length

the length of the shape. A multiplier for the y component of the envelope

envelope

a list of points defining the profile of the shape. The default envelope is a vertical line which produces a hollow cylinder.