Pass:capsule
EditDraws a capsule. A capsule is shaped like a cylinder with a hemisphere on each end.
Arguments
Name | Type | Default | Description |
x | number | 0 | The x coordinate of the center of the capsule. |
y | number | 0 | The y coordinate of the center of the capsule. |
z | number | 0 | The z coordinate of the center of the capsule. |
radius | number | 1.0 | The radius of the capsule. |
length | number | 1 | The length of the capsule. |
angle | number | 0 | The rotation of the capsule around its rotation axis, in radians. |
ax | number | 0 | The x component of the axis of rotation. |
ay | number | 1 | The y component of the axis of rotation. |
az | number | 0 | The z component of the axis of rotation. |
segments | number | 32 | The number of circular segments to render. |
Returns
Nothing
Arguments
Name | Type | Default | Description |
position | Vec3 | The position of the center of the capsule. | |
radius | number | 1.0 | The radius of the capsule. |
length | number | 1 | The length of the capsule. |
orientation | Quat | The orientation of the capsule. | |
segments | number | 32 | The number of circular segments to render. |
Returns
Nothing
Arguments
Name | Type | Default | Description |
transform | Mat4 | The transform of the capsule. | |
segments | number | 32 | The number of circular segments to render. |
Returns
Nothing
Draws a capsule between two points.
Arguments
Name | Type | Default | Description |
p1 | Vec3 | The starting point of the capsule. | |
p2 | Vec3 | The ending point of the capsule. | |
radius | number | 1.0 | The radius of the capsule. |
segments | number | 32 | 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.