| | | 1 | | //======================================================================= |
| | | 2 | | // ConePlaneRayEventSource.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>An unbounded shared plane or one authored finite boundary segment.</summary> |
| | | 13 | | internal readonly struct ConePlaneRayEventSource |
| | | 14 | | { |
| | | 15 | | internal readonly ConePlaneRayEventScope Scope; |
| | 251773 | 16 | | internal bool IsSegment => Scope != ConePlaneRayEventScope.Plane; |
| | | 17 | | internal readonly Vector3d A, B; |
| | 3797 | 18 | | internal static ConePlaneRayEventSource Plane => default; |
| | | 19 | | internal ConePlaneRayEventSource(FixedSegment segment) |
| | 4780 | 20 | | { Scope = ConePlaneRayEventScope.Segment; A = segment.Start; B = segment.End; } |
| | | 21 | | // Native rational cuts are borrowed by the synchronous sink, never encoded |
| | | 22 | | // as rounded authored endpoints or replayed from this provenance record. |
| | 12 | 23 | | internal static ConePlaneRayEventSource NativeSegment => new(ConePlaneRayEventScope.NativeSegment); |
| | | 24 | | private ConePlaneRayEventSource(ConePlaneRayEventScope scope) |
| | 36 | 25 | | { Scope = scope; A = B = default; } |
| | | 26 | | } |