CreateCapsule#

Mesh *CreateCapsule(
int slices,
int segments,
float radius = 1.0f,
float halfHeight = 1.0f,
)#

Creates a capsule mesh primitive.

Generates a capsule (cylinder with hemispherical end caps) mesh.

Parameters:
  • slices[in] Number of circumferential slices

  • segments[in] Number of segments along the length

  • radius[in] Radius of the capsule (default: 1.0)

  • halfHeight[in] Half-height of the cylindrical portion (default: 1.0)

Returns:

Pointer to the created capsule mesh