# SCNCapsule

``class SCNCapsule : SCNGeometry``
• ``` init(capDiameter:height:) ```

SwifterSwift: Creates a capsule geometry with the specified diameter and height.

#### Declaration

Swift

``convenience init(capDiameter: CGFloat, height: CGFloat)``

#### Parameters

 ``` capDiameter ``` The diameter both of the capsule’s cylindrical body and of its hemispherical ends. ``` height ``` The height of the capsule along the y-axis of its local coordinate space.
• ``` init(capRadius:height:material:) ```

SwifterSwift: Creates a capsule geometry with the specified radius and height.

#### Declaration

Swift

``convenience init(capRadius: CGFloat, height: CGFloat, material: SCNMaterial)``

#### Parameters

 ``` capRadius ``` The radius both of the capsule’s cylindrical body and of its hemispherical ends. ``` height ``` The height of the capsule along the y-axis of its local coordinate space. ``` material ``` The material of the geometry.
• ``` init(capDiameter:height:material:) ```

SwifterSwift: Creates a capsule geometry with the specified diameter and height.

#### Declaration

Swift

``convenience init(capDiameter: CGFloat, height: CGFloat, material: SCNMaterial)``

#### Parameters

 ``` capDiameter ``` The diameter both of the capsule’s cylindrical body and of its hemispherical ends. ``` height ``` The height of the capsule along the y-axis of its local coordinate space. ``` material ``` The material of the geometry.
• ``` init(capRadius:height:color:) ```

SwifterSwift: Creates a capsule geometry with the specified radius and height.

#### Declaration

Swift

``convenience init(capRadius: CGFloat, height: CGFloat, color: Color)``

#### Parameters

 ``` capRadius ``` The radius both of the capsule’s cylindrical body and of its hemispherical ends. ``` height ``` The height of the capsule along the y-axis of its local coordinate space. ``` material ``` The material of the geometry.
• ``` init(capDiameter:height:color:) ```

SwifterSwift: Creates a capsule geometry with the specified diameter and height.

#### Declaration

Swift

``convenience init(capDiameter: CGFloat, height: CGFloat, color: Color)``

#### Parameters

 ``` capDiameter ``` The diameter both of the capsule’s cylindrical body and of its hemispherical ends. ``` height ``` The height of the capsule along the y-axis of its local coordinate space. ``` material ``` The material of the geometry.