| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationGuideStep.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 target or semantic action.</summary> |
| | | 13 | | public readonly struct NavigationGuideStep |
| | | 14 | | { |
| | | 15 | | internal NavigationGuideStep( |
| | | 16 | | NavigationCellAddress address, |
| | | 17 | | Vector3d position, |
| | | 18 | | TraversalMedium medium, |
| | | 19 | | NavigationTransitionInstruction transition, |
| | | 20 | | bool hasTransition) |
| | | 21 | | { |
| | 3535 | 22 | | Address = address; |
| | 3535 | 23 | | Position = position; |
| | 3535 | 24 | | Medium = medium; |
| | 3535 | 25 | | Transition = transition; |
| | 3535 | 26 | | HasTransition = hasTransition; |
| | 3535 | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary>Gets the stable address selected for this movement or action step.</summary> |
| | | 30 | | public NavigationCellAddress Address { get; } |
| | | 31 | | |
| | | 32 | | /// <summary>Gets the exact world position selected for this step.</summary> |
| | | 33 | | public Vector3d Position { get; } |
| | | 34 | | |
| | | 35 | | /// <summary>Gets the exact traversal medium before this step 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 step requires explicit semantic-action completion.</summary> |
| | | 42 | | public bool HasTransition { get; } |
| | | 43 | | } |