Pass:cylinder

Draws a cylinder.


Pass:cylinder(transform, capped, angle1, angle2, segments)

Arguments

NameTypeDefaultDescription
transformMat4 The transform of the cylinder. Can also be provided as position, scale, and rotation using a mix of Vectors or numbers. When using numbers for the scale, 2 should be provided: one for the radius and one for the length. When using a matrix or a vector for the scale, the X and Y components are the radius and the Z component is the length.
cappedbooleantrue Whether the tops and bottoms of the cylinder should be rendered.
angle1number0 The angle of the beginning of the arc.
angle2number2 * math.pi angle of the end of the arc.
segmentsnumber64 The number of circular segments to render.

Returns

Nothing


Pass:cylinder(p1, p2, radius, capped, angle1, angle2, segments)

Arguments

NameTypeDefaultDescription
p1Vec3 The starting point of the cylinder.
p2Vec3 The ending point of the cylinder.
radiusnumber The radius of the cylinder.
cappedbooleantrue Whether the tops and bottoms of the cylinder should be rendered.
angle1number0 The angle of the beginning of the arc.
angle2number2 * math.pi angle of the end of the arc.
segmentsnumber64 The number of circular segments to render.

Returns

Nothing

Notes

The local origin is in the center of the cylinder, and the length of the cylinder is along the z axis.

See also