Class GeometricPrimitive.Cylinder
- Namespace
- Stride.Graphics.GeometricPrimitives
- Assembly
- Stride.Graphics.dll
A Cylinder primitive.
public static class GeometricPrimitive.Cylinder
- Inheritance
-
GeometricPrimitive.Cylinder
Methods
New(GraphicsDevice, float, float, int, float, float, bool)
Creates a cylinder primitive.
public static GeometricPrimitive New(GraphicsDevice device, float height = 1, float radius = 0.5, int tessellation = 32, float uScale = 1, float vScale = 1, bool toLeftHanded = false)
Parameters
device
GraphicsDeviceThe device.
height
floatThe height.
radius
floatThe radius.
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 cylinder primitive.
Exceptions
- ArgumentOutOfRangeException
tessellation;tessellation must be >= 3
New(float, float, int, float, float, bool)
Creates a cylinder primitive.
public static GeometricMeshData<VertexPositionNormalTexture> New(float height = 1, float radius = 0.5, int tessellation = 32, float uScale = 1, float vScale = 1, bool toLeftHanded = false)
Parameters
height
floatThe height.
radius
floatThe radius.
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 cylinder primitive.
Exceptions
- ArgumentOutOfRangeException
tessellation;tessellation must be >= 3