| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationFlowSample.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 FixedMathSharp; |
| | | 9 | | |
| | | 10 | | namespace Trailblazer.Pathing; |
| | | 11 | | |
| | | 12 | | /// <summary>Stores one medium-specific movement sample or semantic action.</summary> |
| | | 13 | | public readonly struct NavigationFlowSample |
| | | 14 | | { |
| | | 15 | | internal NavigationFlowSample( |
| | | 16 | | Vector3d heading, |
| | | 17 | | Vector3d target, |
| | | 18 | | TraversalMedium medium, |
| | | 19 | | NavigationTransitionInstruction transition, |
| | | 20 | | bool hasTransition) |
| | | 21 | | { |
| | 1284 | 22 | | Heading = heading; |
| | 1284 | 23 | | Target = target; |
| | 1284 | 24 | | Medium = medium; |
| | 1284 | 25 | | Transition = transition; |
| | 1284 | 26 | | HasTransition = hasTransition; |
| | 1284 | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary>Gets the deterministic ordinary movement heading, or zero for a pending action.</summary> |
| | | 30 | | public Vector3d Heading { get; } |
| | | 31 | | |
| | | 32 | | /// <summary>Gets the exact movement or action-approach target.</summary> |
| | | 33 | | public Vector3d Target { get; } |
| | | 34 | | |
| | | 35 | | /// <summary>Gets the exact traversal medium before this sample completes.</summary> |
| | | 36 | | public TraversalMedium Medium { get; } |
| | | 37 | | |
| | | 38 | | /// <summary>Gets the semantic action when <see cref="HasTransition"/> is true.</summary> |
| | | 39 | | public NavigationTransitionInstruction Transition { get; } |
| | | 40 | | |
| | | 41 | | /// <summary>Gets whether this sample requires explicit semantic-action completion.</summary> |
| | | 42 | | public bool HasTransition { get; } |
| | | 43 | | } |