Table of Contents

Namespace Stride.CommunityToolkit.Rendering.ProceduralModels

Classes

Capsule2DProceduralModel

Procedurally generates a 2D capsule (stadium) mesh composed of two semicircles and a central rectangle. Mesh instances are cached per dimension/tessellation/UV combination for reuse.

CircleProceduralModel

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

PolygonProceduralModel

Generates a planar polygon mesh (convex fan triangulation) from an arbitrary set of 2D vertices.

Primitive2D

A flat 2D primitive shape in the XY plane with its dimensions: the thing game.CreatePrimitive(Primitive2D.Circle(0.5f)) builds a model from, and a physics package derives the matching collider from. A 2D shape still lives in a 3D world; the thickness its collider gets along Z is Depth, one unit unless the factory is told otherwise. The model is flat whatever the depth.

Primitive2D.CapsuleShape

A capsule; Capsule(float, float, int, float) makes one. Height is the whole shape, end to end.

Primitive2D.CircleShape

A circle; Circle(float, int, float) makes one.

Primitive2D.PolygonShape

A polygon from its corners; Polygon(params Vector2[]) makes one.

Primitive2D.RectangleShape

A rectangle; Rectangle(float, float, float) and Square(float, float) make one.

Primitive2D.RegularPolygonShape

A regular polygon; RegularPolygon(float, int, float) makes one.

Primitive2D.TriangleShape

A triangle; Triangle(float, float, float) makes one.

Primitive3D

A 3D primitive shape with its dimensions: the thing game.CreatePrimitive(Primitive3D.Sphere(0.5f)) builds a model from, and a physics package derives the matching collider from.

Primitive3D.BoxShape

A box; Cube(float) and Box(Vector3) make one.

Primitive3D.CapsuleShape

A capsule; Capsule(float, float, int) makes one. Length is the cylinder between the two hemispheres.

Primitive3D.ConeShape

A cone; Cone(float, float, int) makes one.

Primitive3D.CylinderShape

A cylinder; Cylinder(float, float, int) makes one.

Primitive3D.PlaneShape

A plane; Plane(float, float, int, int) makes one.

Primitive3D.SphereShape

A sphere; Sphere(float, int) makes one.

Primitive3D.TeapotShape

A teapot; Teapot(float, int) makes one.

Primitive3D.TextShape

Solid lettering; Text(string, MeshFont?, float, float, Anchor?) makes one.

Primitive3D.TorusShape

A torus; Torus(float, float, int) makes one.

Primitive3D.TriangularPrismShape

A triangular prism; TriangularPrism(Vector3) makes one.

ProceduralModelBuilder

Builds the procedural model of a Primitive3D or Primitive2D shape.

RectangleProceduralModel

Generates a textured rectangle (quad) in the XY plane.

TextProceduralModel

A procedural model of solid lettering: Text in a Font, built by TextMesh. What Primitive3D.Text turns into.

TriangleProceduralModel

Generates an isosceles triangle primitive in the XY plane.

TriangularPrismProceduralModel

Procedural model that generates a triangular prism.