Skip to content

cf_draw3d_capsule

Category: draw3d
GitHub: cute_draw3d.h


Draws a solid capsule lit by a simple built-in hemisphere light.

void cf_draw3d_capsule(CF_V3 a, CF_V3 b, float radius);
Parameters Description
a The center of one hemispherical cap.
b The center of the other cap.
radius The capsule's radius.

Remarks

The debug shape for character controllers and swept spheres. Degenerates to a sphere when a equals b. Composed from three sub-mesh records (side + two caps) that coalesce with every other interleaved solid, so drawing one costs the same batch as any other shape.

cf_draw3d_cylinder
cf_draw3d_sphere
cf_draw3d_cube
cf_draw3d_cone
cf_draw3d_push_color