| | | 1 | | //======================================================================= |
| | | 2 | | // ConeSurfaceFamilyWitness.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 | | // Slots 0..2 are a cone-local unnormalized normal; 3..5 and 6..8 are |
| | | 14 | | // centered raw p/q numerators over common slot 9; 10..11 retain segment t. |
| | | 15 | | internal readonly ref struct ConeSurfaceFamilyWitness |
| | | 16 | | { |
| | | 17 | | internal readonly Span<ulong> Values, Root; |
| | | 18 | | internal readonly Span<int> Signs; |
| | 194660 | 19 | | internal int FieldWords => Values.Length / 24; |
| | 162605 | 20 | | internal ContactQuadratic this[int index] => ContactQuadratic.At(Values, Signs, index, FieldWords); |
| | | 21 | | internal ConeSurfaceFamilyWitness(Span<ulong> values, Span<int> signs, Span<ulong> root) |
| | 35693 | 22 | | { Values = values; Signs = signs; Root = root; values.Clear(); signs.Clear(); root.Clear(); } |
| | | 23 | | } |