Pass:capsule

Edit

Draws a capsule. A capsule is shaped like a cylinder with a hemisphere on each end.





Arguments

NameTypeDefaultDescription
xnumber0 The x coordinate of the center of the capsule.
ynumber0 The y coordinate of the center of the capsule.
znumber0 The z coordinate of the center of the capsule.
radiusnumber1.0 The radius of the capsule.
lengthnumber1 The length of the capsule.
anglenumber0 The rotation of the capsule around its rotation axis, in radians.
axnumber0 The x component of the axis of rotation.
aynumber1 The y component of the axis of rotation.
aznumber0 The z component of the axis of rotation.
segmentsnumber32 The number of circular segments to render.

Returns

Nothing

Arguments

NameTypeDefaultDescription
positionVec3 The position of the center of the capsule.
radiusnumber1.0 The radius of the capsule.
lengthnumber1 The length of the capsule.
orientationQuat The orientation of the capsule.
segmentsnumber32 The number of circular segments to render.

Returns

Nothing

Arguments

NameTypeDefaultDescription
transformMat4 The transform of the capsule.
segmentsnumber32 The number of circular segments to render.

Returns

Nothing

Draws a capsule between two points.

Arguments

NameTypeDefaultDescription
p1Vec3 The starting point of the capsule.
p2Vec3 The ending point of the capsule.
radiusnumber1.0 The radius of the capsule.
segmentsnumber32 The number of circular segments to render.

Returns

Nothing

Notes

The length of the capsule does not include the end caps. The local origin of the capsule is in the center, and the local z axis points towards the end caps.

See also