| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationBaselineVoxelState.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 GridForge.Spatial; |
| | | 9 | | |
| | | 10 | | namespace GridForge.Grids; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Immutable post-mutation state for one requested topology-local address. |
| | | 14 | | /// </summary> |
| | | 15 | | public readonly struct NavigationBaselineVoxelState |
| | | 16 | | { |
| | | 17 | | /// <summary> |
| | | 18 | | /// The requested topology-local address. |
| | | 19 | | /// </summary> |
| | | 20 | | public readonly VoxelIndex VoxelIndex; |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Whether a physical voxel is present at the requested address. |
| | | 24 | | /// </summary> |
| | | 25 | | public readonly bool IsPresent; |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// The physical voxel obstacle count, or zero when no voxel is present. |
| | | 29 | | /// </summary> |
| | | 30 | | public readonly byte ObstacleCount; |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// Initializes a navigation baseline address state. |
| | | 34 | | /// </summary> |
| | | 35 | | public NavigationBaselineVoxelState(VoxelIndex voxelIndex, bool isPresent, byte obstacleCount) |
| | | 36 | | { |
| | 8 | 37 | | VoxelIndex = voxelIndex; |
| | 8 | 38 | | IsPresent = isPresent; |
| | 8 | 39 | | ObstacleCount = obstacleCount; |
| | 8 | 40 | | } |
| | | 41 | | } |