| | | 1 | | //======================================================================= |
| | | 2 | | // ConeSurfaceFamilyEvent.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 | | using static FixedMathSharp.Geometry.ContactQuadratic; |
| | | 10 | | |
| | | 11 | | namespace FixedMathSharp.Geometry; |
| | | 12 | | |
| | | 13 | | /// <summary>Compact exact construction provenance; replay uses the original candidate and halfspace order.</summary> |
| | | 14 | | internal readonly struct ConeSurfaceFamilyEvent |
| | | 15 | | { |
| | | 16 | | internal readonly ConeSurfaceFamilyEventKind Kind; |
| | | 17 | | internal readonly int First, Second, Branch, Parameter; |
| | | 18 | | internal ConeSurfacePointLocation PointLocation { get; } |
| | | 19 | | internal ConeSurfaceFamilyEvent(ConeSurfaceFamilyEventKind kind, int first, int second, int branch, int parameter, C |
| | 29904 | 20 | | { Kind = kind; First = first; Second = second; Branch = branch; Parameter = parameter; PointLocation = location; } |
| | | 21 | | internal FixedContactAnchors GetContact(in SegmentConeSurfaceCandidate candidate, ReadOnlySpan<WideAxis3> halfspaces |
| | 600 | 22 | | SegmentConeSurfaceCandidates.GetFamilyContact(candidate, halfspaces, this); |
| | | 23 | | internal FixedContactAnchors GetContact(in SegmentConeSurfaceCandidate candidate, ReadOnlySpan<WideAxis3> halfspaces |
| | 39 | 24 | | in RationalSegmentInterval clip) => SegmentConeSurfaceCandidates.GetFamilyContact(candidate, halfspaces, this, c |
| | | 25 | | internal bool TryGetWorldAnchors(in SegmentConeSurfaceCandidate candidate, ReadOnlySpan<WideAxis3> halfspaces, out V |
| | 154 | 26 | | SegmentConeSurfaceCandidates.TryGetFamilyWorldAnchors(candidate, halfspaces, this, out first, out second); |
| | | 27 | | internal bool TryGetWorldAnchors(in SegmentConeSurfaceCandidate candidate, ReadOnlySpan<WideAxis3> halfspaces, |
| | | 28 | | in RationalSegmentInterval clip, out Vector3d first, out Vector3d second) => |
| | 34 | 29 | | SegmentConeSurfaceCandidates.TryGetFamilyWorldAnchors(candidate, halfspaces, this, out first, out second, clip); |
| | | 30 | | } |