Table of Contents

Class GeometricPrimitive.Cylinder

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

A Cylinder primitive.

public static class GeometricPrimitive.Cylinder
Inheritance
object
GeometricPrimitive.Cylinder

Methods

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

Creates a cylinder primitive.

public static GeometricPrimitive New(GraphicsDevice device, float height, float radius, int tessellation, float uScale, float vScale, bool toLeftHanded)

Parameters

device GraphicsDevice

The device.

height float

The height.

radius float

The radius.

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.

Returns

GeometricPrimitive

A cylinder primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;tessellation must be >= 3

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

Creates a cylinder primitive with additional rings along its height.

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, int heightRings = 0)

Parameters

device GraphicsDevice

The device.

height float

The height.

radius float

The radius.

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.

heightRings int

The number of vertex rings added between the top and bottom edges of the side. Negative values are treated as 0.

Returns

GeometricPrimitive

A cylinder primitive.

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

Creates a cylinder primitive.

public static GeometricMeshData<VertexPositionNormalTexture> New(float height, float radius, int tessellation, float uScale, float vScale, bool toLeftHanded)

Parameters

height float

The height.

radius float

The radius.

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.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A cylinder primitive.

Exceptions

ArgumentOutOfRangeException

tessellation;tessellation must be >= 3

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

Creates a cylinder primitive with additional rings along its height.

public static GeometricMeshData<VertexPositionNormalTexture> New(float height = 1, float radius = 0.5, int tessellation = 32, float uScale = 1, float vScale = 1, bool toLeftHanded = false, int heightRings = 0)

Parameters

height float

The height.

radius float

The radius.

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.

heightRings int

The number of vertex rings added between the top and bottom edges of the side. Negative values are treated as 0.

Returns

GeometricMeshData<VertexPositionNormalTexture>

A cylinder primitive.