| | | 1 | | //======================================================================= |
| | | 2 | | // BoundarySpan.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2026-present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | using FixedMathSharp; |
| | | 9 | | using FixedMathSharp.Geometry; |
| | | 10 | | |
| | | 11 | | namespace Gravitas.CollisionHandling; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Stores a classified interval of an original planar perimeter edge and its adjacent member. |
| | | 15 | | /// </summary> |
| | | 16 | | internal readonly struct BoundarySpan2D |
| | | 17 | | { |
| | | 18 | | internal readonly int First, Second, OtherMember; |
| | | 19 | | internal readonly Vector2d Start, End; |
| | | 20 | | internal readonly RationalSegmentInterval Interval; |
| | | 21 | | internal readonly SpanKind Kind; |
| | | 22 | | internal readonly FixedBoundArea Bounds; |
| | | 23 | | internal BoundarySpan2D(int first, int second, Vector2d start, Vector2d end, |
| | | 24 | | in RationalSegmentInterval interval, SpanKind kind, int otherMember, FixedBoundArea bounds) |
| | | 25 | | { |
| | 41648 | 26 | | First = first; Second = second; Start = start; End = end; |
| | 31236 | 27 | | Interval = interval; Kind = kind; OtherMember = otherMember; |
| | 10412 | 28 | | Bounds = bounds; |
| | 10412 | 29 | | } |
| | | 30 | | } |