| | | 1 | | //======================================================================= |
| | | 2 | | // CapsulePlaneRayEvent.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2024-present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | |
| | | 10 | | namespace FixedMathSharp.Geometry; |
| | | 11 | | |
| | | 12 | | /// <summary>A reconstructible exact point in the plane or its finite perimeter.</summary> |
| | | 13 | | internal readonly struct CapsulePlaneRayEvent |
| | | 14 | | { |
| | | 15 | | internal readonly CapsulePlaneRayEventKind Kind; |
| | | 16 | | internal readonly sbyte Feature, Branch, Orientation; |
| | | 17 | | internal CapsulePlaneRayEvent(CapsulePlaneRayEventKind kind, int feature = 0, int branch = 0, int orientation = 0) |
| | 16825 | 18 | | { Kind = kind; Feature = (sbyte)feature; Branch = (sbyte)branch; Orientation = (sbyte)orientation; } |
| | | 19 | | internal bool Matches(in CapsulePlaneRayEvent other) => |
| | 1442 | 20 | | Kind == other.Kind && Feature == other.Feature && Branch == other.Branch && Orientation == other.Orientation; |
| | | 21 | | } |