| | | 1 | | using FixedMathSharp; |
| | | 2 | | |
| | | 3 | | namespace Trailblazer.Navigation.Motor; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Immutable snapshot describing the currently latched mantle state. |
| | | 7 | | /// </summary> |
| | | 8 | | public readonly struct ActiveMantleState |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Initializes a new active mantle snapshot. |
| | | 12 | | /// </summary> |
| | | 13 | | public ActiveMantleState( |
| | | 14 | | ClimbAffordanceKind kind, |
| | | 15 | | int? affordanceId, |
| | | 16 | | Vector3d attachmentPoint, |
| | | 17 | | Vector3d surfaceNormal, |
| | | 18 | | Vector3d upDirection, |
| | | 19 | | Vector3d mantleTargetPosition) |
| | | 20 | | { |
| | 4 | 21 | | Kind = kind; |
| | 4 | 22 | | AffordanceId = affordanceId; |
| | 4 | 23 | | AttachmentPoint = attachmentPoint; |
| | 4 | 24 | | SurfaceNormal = surfaceNormal; |
| | 4 | 25 | | UpDirection = upDirection; |
| | 4 | 26 | | MantleTargetPosition = mantleTargetPosition; |
| | 4 | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Gets the type of climb affordance represented by this instance. |
| | | 31 | | /// </summary> |
| | | 32 | | public ClimbAffordanceKind Kind { get; } |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// Gets the identifier of the associated affordance, if available. |
| | | 36 | | /// </summary> |
| | | 37 | | public int? AffordanceId { get; } |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// Gets the position in 3D space where the object is attached. |
| | | 41 | | /// </summary> |
| | | 42 | | public Vector3d AttachmentPoint { get; } |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// Gets the normal vector perpendicular to the surface at the current location. |
| | | 46 | | /// </summary> |
| | | 47 | | public Vector3d SurfaceNormal { get; } |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// Gets the up direction vector for the current coordinate system or object. |
| | | 51 | | /// </summary> |
| | | 52 | | public Vector3d UpDirection { get; } |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// Gets the target world position for the mantling action. |
| | | 56 | | /// </summary> |
| | | 57 | | public Vector3d MantleTargetPosition { get; } |
| | | 58 | | } |