GeometricPrimitive.Capsule Class
Namespace: Stride.Graphics.GeometricPrimitivesAssembly: Stride.Graphics.dll
A sphere primitive.
public static class Capsule
| Name | Description | |
|---|---|---|
| Methods | ||
| New(GraphicsDevice, Single, Single, Int32, Single, Single, Boolean) | Creates a sphere primitive. |
|
| New(Single, Single, Int32, Single, Single, Boolean) | Creates a sphere primitive. |
|
Methods
New(GraphicsDevice, Single, Single, Int32, Single, Single, Boolean)
Creates a sphere primitive.
public static GeometricPrimitive New(GraphicsDevice device, float length = 1F, float radius = 0.5F, int tessellation = 8, float uScale = 1F, float vScale = 1F, bool toLeftHanded = false)
Parameters
| Type | Name | Description |
|---|---|---|
| GraphicsDevice | device | The device. |
| System.Single | length | The length. That is the distance between the two sphere centers. |
| System.Single | radius | The radius of the capsule. |
| System.Int32 | tessellation | The tessellation. |
| System.Single | uScale | Scale U coordinates between 0 and the values of this parameter. |
| System.Single | vScale | Scale V coordinates 0 and the values of this parameter. |
| System.Boolean | toLeftHanded | if set to |
Returns
| Type | Description |
|---|---|
| GeometricPrimitive | A sphere primitive. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | tessellation;Must be >= 3 |
New(Single, Single, Int32, Single, Single, Boolean)
Creates a sphere primitive.
public static GeometricMeshData<VertexPositionNormalTexture> New(float length = 1F, float radius = 0.5F, int tessellation = 8, float uScale = 1F, float vScale = 1F, bool toLeftHanded = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | length | The length of the capsule. That is the distance between the two sphere centers. |
| System.Single | radius | The radius of the capsule. |
| System.Int32 | tessellation | The tessellation. |
| System.Single | uScale | Scale U coordinates between 0 and the values of this parameter. |
| System.Single | vScale | Scale V coordinates 0 and the values of this parameter. |
| System.Boolean | toLeftHanded | if set to |
Returns
| Type | Description |
|---|---|
| GeometricMeshData<VertexPositionNormalTexture> | A sphere primitive. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | tessellation;Must be >= 3 |