capsule

fun Canvas.capsule(x1: Int, y1: Int, z1: Int, x2: Int, y2: Int, z2: Int, radius: Float, slices: Int = 8, rings: Int = 8, color: Color = Color.BLACK)

Draws a capsule's wires in 3D space.

Parameters

x1

The X coordinate of the starting point.

y1

The Y coordinate of the starting point.

z1

The Z coordinate of the starting point.

x2

The X coordinate of the ending point.

y2

The Y coordinate of the ending point.

z2

The Z coordinate of the ending point.

radius

The radius of the capsule.

slices

The number of slices to use for drawing. Defaults to 8. Increasing the number of slices will result in a smoother capsule.

rings

The number of rings to use for drawing. Defaults to 8. Increasing the number of rings will result in a smoother capsule.

color

The color of the capsule wires.