| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationAStarGuidePoint.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 immutable addressed waypoint in a certified A* guide.</summary> |
| | | 13 | | internal readonly struct NavigationAStarGuidePoint |
| | | 14 | | { |
| | | 15 | | internal NavigationAStarGuidePoint( |
| | | 16 | | NavigationCellAddress address, |
| | | 17 | | Vector3d position, |
| | | 18 | | TraversalMedium medium, |
| | | 19 | | int transitionOrdinal = -1) |
| | | 20 | | { |
| | 2210 | 21 | | Address = address; |
| | 2210 | 22 | | Position = position; |
| | 2210 | 23 | | Medium = medium; |
| | 2210 | 24 | | TransitionOrdinal = transitionOrdinal; |
| | 2210 | 25 | | } |
| | | 26 | | |
| | | 27 | | internal NavigationCellAddress Address { get; } |
| | | 28 | | |
| | | 29 | | internal Vector3d Position { get; } |
| | | 30 | | |
| | | 31 | | internal TraversalMedium Medium { get; } |
| | | 32 | | |
| | | 33 | | internal int TransitionOrdinal { get; } |
| | | 34 | | |
| | 7749 | 35 | | internal bool HasTransition => TransitionOrdinal >= 0; |
| | | 36 | | } |