# Capsule

A capsule object, defined by 2 points and a radius. A capsule is a cylinder with round ends (inset half spheres on each end).

- Kind: struct
- Assembly: `Sandbox.System`
- Modifiers: sealed

## Constructors

- [`Capsule`](/api/Capsule/.ctor)

## Fields

- [`CenterA`](/api/Capsule/CenterA): Position of point A.
- [`CenterB`](/api/Capsule/CenterB): Position of point B.
- [`Radius`](/api/Capsule/Radius): Radius of a capsule.

## Properties

- [`Bounds`](/api/Capsule/Bounds): Gets the Bounding Box of the capsule.
- [`RandomPointInside`](/api/Capsule/RandomPointInside): Returns a random point within this capsule.
- [`RandomPointOnEdge`](/api/Capsule/RandomPointOnEdge): Returns a random point on the edge of this capsule.
- [`Volume`](/api/Capsule/Volume): Gets the volume of the capsule in cubic units.

## Methods

- [`Contains`](/api/Capsule/Contains): Determines if the capsule contains the specified point.
- [`FromHeightAndRadius`](/api/Capsule/FromHeightAndRadius): Creates a capsule where Point A is radius units above the ground and Point B is height minus radius units above the ground.
- [`GetEdgeDistance`](/api/Capsule/GetEdgeDistance): Calculates the distance from a given point to the edge of the capsule.
