From 909b93088ce4fa8f508768858f079d5e1c434db2 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Wed, 24 Jan 2024 12:02:04 +0300 Subject: [PATCH] feat: Shape Index Accessor --- Engine.Physics2D/Primitives/Shape.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Engine.Physics2D/Primitives/Shape.cs b/Engine.Physics2D/Primitives/Shape.cs index 1091856..231e114 100644 --- a/Engine.Physics2D/Primitives/Shape.cs +++ b/Engine.Physics2D/Primitives/Shape.cs @@ -7,6 +7,8 @@ namespace Syntriax.Engine.Physics2D.Primitives; public record Shape(IList Vertices) { + public Vector2D this[int index] => Vertices[index]; + public static Triangle GetSuperTriangle(Shape shape) { float minX = float.MaxValue, minY = float.MaxValue;