| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationSurfaceComponent.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 | | namespace Trailblazer.Pathing; |
| | | 9 | | |
| | | 10 | | /// <summary>Stores one immutable exact weak surface component.</summary> |
| | | 11 | | internal sealed class NavigationSurfaceComponent |
| | | 12 | | { |
| | 1964 | 13 | | internal NavigationSurfaceComponent( |
| | 1964 | 14 | | NavigationSurfaceComponentKey key, |
| | 1964 | 15 | | long version, |
| | 1964 | 16 | | NavigationPagedSequence<NavigationCellAddress> members, |
| | 1964 | 17 | | bool allSurfaceEdgesEuclideanCertified) |
| | | 18 | | { |
| | 1964 | 19 | | Key = key; |
| | 1964 | 20 | | Version = version; |
| | 1964 | 21 | | Members = members; |
| | 1964 | 22 | | AllSurfaceEdgesEuclideanCertified = allSurfaceEdgesEuclideanCertified; |
| | 1964 | 23 | | } |
| | | 24 | | |
| | | 25 | | internal NavigationSurfaceComponentKey Key { get; } |
| | | 26 | | |
| | | 27 | | internal long Version { get; } |
| | | 28 | | |
| | | 29 | | internal NavigationPagedSequence<NavigationCellAddress> Members { get; } |
| | | 30 | | |
| | | 31 | | internal bool AllSurfaceEdgesEuclideanCertified { get; } |
| | | 32 | | |
| | 4129 | 33 | | internal long RetainedBytes => checked(48L + Members.RetainedBytes); |
| | | 34 | | |
| | 4129 | 35 | | internal int PersistentPageCount => checked(1 + Members.PersistentPageCount); |
| | | 36 | | } |