Table of Contents

Class CircleProceduralModel

Namespace
Stride.CommunityToolkit.Rendering.ProceduralModels
Assembly
Stride.CommunityToolkit.dll

Procedurally generates a filled 2D circle mesh oriented in the XY plane. Meshes are cached per (radius, tessellation, UV scale, handedness) for reuse.

public class CircleProceduralModel : PrimitiveProceduralModelBase, IProceduralModel
Inheritance
CircleProceduralModel
Implements
Inherited Members

Properties

Radius

Circle radius.

public float Radius { get; set; }

Property Value

float

Tessellation

Number of perimeter segments (higher = smoother circle).

public int Tessellation { get; set; }

Property Value

int

Methods

CreateMesh(float, int, float, float, bool)

Builds a new circle mesh (without caching) using provided parameters.

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

Parameters

radius float

Radius of the circle.

tessellation int

Number of segments around the perimeter.

uScale float

Texture U scale factor.

vScale float

Texture V scale factor.

toLeftHanded bool

If true, reverses winding.

Returns

GeometricMeshData<VertexPositionNormalTexture>

Mesh data for a circle.

CreatePrimitiveMeshData()

Creates mesh data for the current radius, tessellation and UV scale settings.

protected override GeometricMeshData<VertexPositionNormalTexture> CreatePrimitiveMeshData()

Returns

GeometricMeshData<VertexPositionNormalTexture>

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

Retrieves (or builds and caches) a circle mesh with the specified parameters.

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

Parameters

radius float

Radius of the circle.

tessellation int

Number of segments around the perimeter.

uScale float

Texture U scale factor.

vScale float

Texture V scale factor.

toLeftHanded bool

If true, reverses winding.

Returns

GeometricMeshData<VertexPositionNormalTexture>

Mesh data for a circle.