---
title: "Capsules3D"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

3D capsules; cylinders with hemispherical caps.

Capsules are defined by two endpoints (the centers of their end cap spheres), which are located
at (0, 0, 0) and (0, 0, length), that is, extending along the positive direction of the Z axis.
Capsules in other orientations may be produced by applying a rotation to the entity or
instances.

If there's more instance poses than lengths & radii, the last capsule's orientation will be repeated for the remaining poses.
Orienting and placing capsules forms a separate transform that is applied prior to [`archetypes.InstancePoses3D`](https://rerun.io/docs/reference/types/archetypes/instance_poses3d) and [`archetypes.Transform3D`](https://rerun.io/docs/reference/types/archetypes/transform3d).

## Fields
### Required
* `lengths`: [`Length`](../components/length.md)
* `radii`: [`Radius`](../components/radius.md)

### Recommended
* `translations`: [`Translation3D`](../components/translation3d.md)
* `colors`: [`Color`](../components/color.md)

### Optional
* `rotation_axis_angles`: [`RotationAxisAngle`](../components/rotation_axis_angle.md)
* `quaternions`: [`RotationQuat`](../components/rotation_quat.md)
* `line_radii`: [`Radius`](../components/radius.md)
* `fill_mode`: [`FillMode`](../components/fill_mode.md)
* `labels`: [`Text`](../components/text.md)
* `show_labels`: [`ShowLabels`](../components/show_labels.md)
* `class_ids`: [`ClassId`](../components/class_id.md)


## Can be shown in
* [Spatial3DView](../views/spatial3d_view.md)
* [Spatial2DView](../views/spatial2d_view.md) (if logged above active projection)
* [DataframeView](../views/dataframe_view.md)

## API reference links
 * 🌊 [C++ API docs for `Capsules3D`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1archetypes_1_1Capsules3D.html)
 * 🐍 [Python API docs for `Capsules3D`](https://ref.rerun.io/docs/python/stable/common/archetypes#rerun.archetypes.Capsules3D)
 * 🦀 [Rust API docs for `Capsules3D`](https://docs.rs/rerun/latest/rerun/archetypes/struct.Capsules3D.html)

## Example

### Batch of capsules

snippet: archetypes/capsules3d_batch

<picture data-inline-viewer="snippets/archetypes/capsules3d_batch">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/capsule3d_batch/6e6a4acafcf528359372147d7247f85d84434101/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/capsule3d_batch/6e6a4acafcf528359372147d7247f85d84434101/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/capsule3d_batch/6e6a4acafcf528359372147d7247f85d84434101/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/capsule3d_batch/6e6a4acafcf528359372147d7247f85d84434101/1200w.png">
  <img src="https://static.rerun.io/capsule3d_batch/6e6a4acafcf528359372147d7247f85d84434101/full.png">
</picture>

