| | | 1 | | //======================================================================= |
| | | 2 | | // ProjectedSurfaceRelation.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.Queries; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Retains one admitted X/Z projected-surface relation and its independent |
| | | 15 | | /// real 3D surface witness. |
| | | 16 | | /// </summary> |
| | | 17 | | internal readonly struct ProjectedSurfaceRelation |
| | | 18 | | { |
| | | 19 | | internal ProjectedSurfaceRelation( |
| | | 20 | | Fixed64 distance, |
| | | 21 | | Vector2d offset, |
| | | 22 | | Vector2d direction, |
| | | 23 | | FixedPointAnchor contactAnchor, |
| | | 24 | | Vector3d outwardNormal, |
| | | 25 | | bool isContained) |
| | | 26 | | { |
| | 1520 | 27 | | Distance = distance; |
| | 1520 | 28 | | Offset = offset; |
| | 1520 | 29 | | Direction = direction; |
| | 1520 | 30 | | ContactAnchor = contactAnchor; |
| | 1520 | 31 | | OutwardNormal = outwardNormal; |
| | 1520 | 32 | | IsContained = isContained; |
| | 1520 | 33 | | } |
| | | 34 | | |
| | | 35 | | internal Fixed64 Distance { get; } |
| | | 36 | | |
| | | 37 | | internal Vector2d Offset { get; } |
| | | 38 | | |
| | | 39 | | internal Vector2d Direction { get; } |
| | | 40 | | |
| | | 41 | | internal FixedPointAnchor ContactAnchor { get; } |
| | | 42 | | |
| | | 43 | | internal Vector3d OutwardNormal { get; } |
| | | 44 | | |
| | | 45 | | internal bool IsContained { get; } |
| | | 46 | | } |