Table of Contents

Class GeometricPrimitive.Capsule

Namespace
Stride.Graphics.GeometricPrimitives
Assembly
Stride.Graphics.dll

A sphere primitive.

public static class GeometricPrimitive.Capsule
Inheritance
GeometricPrimitive.Capsule

Methods

New(GraphicsDevice, float, float, int, float, float, bool)

Creates a sphere primitive.

public static GeometricPrimitive New(GraphicsDevice device, float length = 1, float radius = 0.5, int tessellation = 8, float uScale = 1, float vScale = 1, bool toLeftHanded = false)

Parameters

device GraphicsDevice

The device.

length float

The length. That is the distance between the two sphere centers.

radius float

The radius of the capsule.

tessellation int

The tessellation.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

Returns

GeometricPrimitive

A sphere primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;Must be >= 3

New(float, float, int, float, float, bool)

Creates a sphere primitive.

public static GeometricMeshData<VertexPositionNormalTexture> New(float length = 1, float radius = 0.5, int tessellation = 8, float uScale = 1, float vScale = 1, bool toLeftHanded = false)

Parameters

length float

The length of the capsule. That is the distance between the two sphere centers.

radius float

The radius of the capsule.

tessellation int

The tessellation.

uScale float

Scale U coordinates between 0 and the values of this parameter.

vScale float

Scale V coordinates 0 and the values of this parameter.

toLeftHanded bool

if set to true vertices and indices will be transformed to left handed. Default is false.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A sphere primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;Must be >= 3