diff --git a/Engine.Physics2D/Primitives/Shape.cs b/Engine.Physics2D/Primitives/Shape.cs index 5aa4c10..74b6142 100644 --- a/Engine.Physics2D/Primitives/Shape.cs +++ b/Engine.Physics2D/Primitives/Shape.cs @@ -8,6 +8,12 @@ namespace Syntriax.Engine.Physics2D.Primitives; public record Shape(IList Vertices) : IEnumerable { + public static readonly Shape Triangle = CreateNgon(3, Vector2D.Up); + public static readonly Shape Box = CreateNgon(4, Vector2D.One); + public static readonly Shape Pentagon = CreateNgon(5, Vector2D.Up); + public static readonly Shape Hexagon = CreateNgon(6, Vector2D.Right); + + public Vector2D this[System.Index index] => Vertices[index]; public static Shape CreateCopy(Shape shape) => new(new List(shape.Vertices));