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
Tessellation
Number of perimeter segments (higher = smoother circle).
public int Tessellation { get; set; }
Property Value
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
floatRadius of the circle.
tessellation
intNumber of segments around the perimeter.
uScale
floatTexture U scale factor.
vScale
floatTexture V scale factor.
toLeftHanded
boolIf 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
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
floatRadius of the circle.
tessellation
intNumber of segments around the perimeter.
uScale
floatTexture U scale factor.
vScale
floatTexture V scale factor.
toLeftHanded
boolIf true, reverses winding.
Returns
- GeometricMeshData<VertexPositionNormalTexture>
Mesh data for a circle.