> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.reactor/ks.reactor.kscapsule.md).

# Class ksCapsule

Namespace: [KS.Reactor](/reactor/api-reference/ks.reactor.md)\
Assembly: KSCommon.dll

Capsule.

```csharp
public class ksCapsule : ksShape
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md) ← [ksCapsule](/reactor/api-reference/ks.reactor/ks.reactor.kscapsule.md)

#### Inherited Members

[ksShape.m\_shapeType](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md#KS_Reactor_ksShape_m_shapeType), [ksShape.Type](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md#KS_Reactor_ksShape_Type), [ksShape.IsQueryShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md#KS_Reactor_ksShape_IsQueryShape), [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### ksCapsule(float, float, Axis) <a href="#ks_reactor_kscapsule__ctor_system_single_system_single_ks_reactor_ksshape_axis" id="ks_reactor_kscapsule__ctor_system_single_system_single_ks_reactor_ksshape_axis"></a>

Constructs a capsule aligned along an axis.

```csharp
public ksCapsule(float radius, float height, ksShape.Axis alignment)
```

#### Parameters

`radius` [float](https://learn.microsoft.com/dotnet/api/system.single)

Raidus.

`height` [float](https://learn.microsoft.com/dotnet/api/system.single)

Total height including caps.

`alignment` [ksShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md).[Axis](/reactor/api-reference/ks.reactor/ks.reactor.ksshape/ks.reactor.ksshape.axis.md)

Axis.

## Properties

### Alignment <a href="#ks_reactor_kscapsule_alignment" id="ks_reactor_kscapsule_alignment"></a>

Alignment.

```csharp
public ksShape.Axis Alignment { get; set; }
```

#### Property Value

[ksShape](/reactor/api-reference/ks.reactor/ks.reactor.ksshape.md).[Axis](/reactor/api-reference/ks.reactor/ks.reactor.ksshape/ks.reactor.ksshape.axis.md)

### CylinderHalfHeight <a href="#ks_reactor_kscapsule_cylinderhalfheight" id="ks_reactor_kscapsule_cylinderhalfheight"></a>

Half height of the cylinder part.

```csharp
public float CylinderHalfHeight { get; set; }
```

#### Property Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

### Height <a href="#ks_reactor_kscapsule_height" id="ks_reactor_kscapsule_height"></a>

Height.

```csharp
public float Height { get; set; }
```

#### Property Value

[float](https://learn.microsoft.com/dotnet/api/system.single)

### Radius <a href="#ks_reactor_kscapsule_radius" id="ks_reactor_kscapsule_radius"></a>

Radius.

```csharp
public float Radius { get; set; }
```

#### Property Value

[float](https://learn.microsoft.com/dotnet/api/system.single)
