refactor nav coverage into clustered windows

Replace region-based runtime pathing with interest-cluster coverage windows so active nav areas stay contiguous and spawn anchors participate in initial coverage.
This commit is contained in:
Alexander Borisov
2026-04-08 13:52:00 +03:00
parent 7282621211
commit 0b380def78
11 changed files with 680 additions and 219 deletions
@@ -17,6 +17,12 @@ namespace InfiniteWorld.VoxelWorld.Contracts
void GetInterestPoints(List<WorldInterestPoint> results);
}
public interface INavCoverageReader
{
bool IsPositionCovered(Vector3 worldPosition);
void GetCoverageWindows(List<NavCoverageWindowSnapshot> results);
}
public readonly struct ChunkNavSourceSnapshot
{
public ChunkNavSourceSnapshot(Vector2Int coord, int version, ChunkNavBuildSourceDescriptor[] sources)
@@ -77,7 +83,31 @@ namespace InfiniteWorld.VoxelWorld.Contracts
{
PlayerActor = 0,
ActiveNpc = 1,
Other = 2
SpawnAnchor = 2,
Other = 3
}
public readonly struct NavCoverageWindowSnapshot
{
public NavCoverageWindowSnapshot(int id, Bounds bounds, NavCoverageState state, int interestCount)
{
Id = id;
Bounds = bounds;
State = state;
InterestCount = interestCount;
}
public int Id { get; }
public Bounds Bounds { get; }
public NavCoverageState State { get; }
public int InterestCount { get; }
}
public enum NavCoverageState
{
Pending = 0,
Building = 1,
Ready = 2
}
public readonly struct ChunkNavGeometryReadyMessage