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
GraphicsDeviceThe device.
majorRadius
floatThe majorRadius.
minorRadius
floatThe minorRadius.
tessellation
intThe tessellation.
uScale
floatScale U coordinates between 0 and the values of this parameter.
vScale
floatScale V coordinates 0 and the values of this parameter.
toLeftHanded
boolif 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
floatThe major radius of the torus.
minorRadius
floatThe minor radius of the torus.
tessellation
intThe tessellation.
uScale
floatScale U coordinates between 0 and the values of this parameter.
vScale
floatScale V coordinates 0 and the values of this parameter.
toLeftHanded
boolif 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