| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationCommittedCellState.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 Trailblazer.Pathing; |
| | | 9 | | |
| | | 10 | | namespace Trailblazer.Navigation; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Describes the effective navigation cell occupied after one controller motion commit. |
| | | 14 | | /// </summary> |
| | | 15 | | public readonly struct NavigationCommittedCellState |
| | | 16 | | { |
| | | 17 | | internal NavigationCommittedCellState( |
| | | 18 | | NavigationCellAddress address, |
| | | 19 | | NavigationAreaId area, |
| | | 20 | | TraversalMedium medium, |
| | | 21 | | long graphVersion, |
| | | 22 | | NavigationAreaPolicyKey? areaPolicy, |
| | | 23 | | int simulationFrame) |
| | | 24 | | { |
| | 33 | 25 | | Address = address; |
| | 33 | 26 | | Area = area; |
| | 33 | 27 | | Medium = medium; |
| | 33 | 28 | | GraphVersion = graphVersion; |
| | 33 | 29 | | AreaPolicy = areaPolicy; |
| | 33 | 30 | | SimulationFrame = simulationFrame; |
| | 33 | 31 | | } |
| | | 32 | | |
| | | 33 | | /// <summary>Gets the durable map and topology-local cell address.</summary> |
| | | 34 | | public NavigationCellAddress Address { get; } |
| | | 35 | | |
| | | 36 | | /// <summary>Gets the host-authored area of the effective cell.</summary> |
| | | 37 | | public NavigationAreaId Area { get; } |
| | | 38 | | |
| | | 39 | | /// <summary>Gets the controller's committed traversal medium.</summary> |
| | | 40 | | public TraversalMedium Medium { get; } |
| | | 41 | | |
| | | 42 | | /// <summary>Gets the immutable graph generation used to resolve the cell.</summary> |
| | | 43 | | public long GraphVersion { get; } |
| | | 44 | | |
| | | 45 | | /// <summary>Gets the active guided-query area policy, when guidance owns one.</summary> |
| | | 46 | | public NavigationAreaPolicyKey? AreaPolicy { get; } |
| | | 47 | | |
| | | 48 | | /// <summary>Gets the deterministic simulation frame at which motion was committed.</summary> |
| | | 49 | | public int SimulationFrame { get; } |
| | | 50 | | } |