Table of Contents

Class GeometricPrimitive.Torus

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

A Torus primitive.

public static class GeometricPrimitive.Torus
Inheritance
GeometricPrimitive.Torus

Methods

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

Creates a torus primitive.

public static GeometricPrimitive New(GraphicsDevice device, float majorRadius = 0.5, float minorRadius = 0.16666, int tessellation = 32, float uScale = 1, float vScale = 1, bool toLeftHanded = false)

Parameters

device GraphicsDevice

The device.

majorRadius float

The majorRadius.

minorRadius float

The minorRadius.

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 Torus primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;tessellation parameter out of range

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

Creates a torus primitive.

public static GeometricMeshData<VertexPositionNormalTexture> New(float majorRadius = 0.5, float minorRadius = 0.16666, int tessellation = 32, float uScale = 1, float vScale = 1, bool toLeftHanded = false)

Parameters

majorRadius float

The major radius of the torus.

minorRadius float

The minor radius of the torus.

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 Torus primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;tessellation parameter out of range