Plush

PrimitiveGeometry2D#

PlushEngine · Type index

Namespace: PlushEngine.Physics2D (using PlushEngine.Physics2D;)

Shared, counterclockwise unit outlines for drawing and collision. Arc is a filled circular segment with a curved crown and straight underside; scale sets width and rise. Nonuniform scale stretches the profile. Both drawing and collision use the same 64 facets.

public static class PrimitiveGeometry2D

Members: Outline · TransformOutline · Triangles

Outline#

public static ReadOnlySpan<Vector2> Outline(string? shape);

TransformOutline#

public static Bounds2D TransformOutline(string? shape, Mat3 transform, Span<Vector2> destination);

Fills caller-owned storage, retaining CCW winding even under mirrored transforms.

Triangles#

public static float[] Triangles(string? shape);

Bounds2D · Mat3

Source#