| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationImmediateRayWorkspace.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>Serializes synchronous callers over one fixed navigation-ray workspace.</summary> |
| | | 11 | | internal sealed class NavigationImmediateRayWorkspace |
| | | 12 | | { |
| | 1192 | 13 | | internal NavigationImmediateRayWorkspace( |
| | 1192 | 14 | | int mapCapacity, |
| | 1192 | 15 | | int pageCapacity, |
| | 1192 | 16 | | int componentCapacity, |
| | 1192 | 17 | | int coveredAddressCapacity, |
| | 1192 | 18 | | int traceIntervalCapacity) |
| | | 19 | | { |
| | 1192 | 20 | | SyncRoot = new object(); |
| | 1192 | 21 | | var workspace = new NavigationRayWorkspace( |
| | 1192 | 22 | | mapCapacity, |
| | 1192 | 23 | | pageCapacity, |
| | 1192 | 24 | | componentCapacity, |
| | 1192 | 25 | | coveredAddressCapacity, |
| | 1192 | 26 | | traceIntervalCapacity); |
| | 1192 | 27 | | RayWork = new NavigationRayWork(workspace); |
| | 1192 | 28 | | WorkMeter = new NavigationWorkMeter(default); |
| | 1192 | 29 | | } |
| | | 30 | | |
| | | 31 | | internal object SyncRoot { get; } |
| | | 32 | | |
| | | 33 | | internal NavigationRayWork RayWork { get; } |
| | | 34 | | |
| | | 35 | | internal NavigationWorkMeter WorkMeter { get; } |
| | | 36 | | } |