diff --git a/src/DotRecast.Detour.TileCache/DtTileCacheBuilder.cs b/src/DotRecast.Detour.TileCache/DtTileCacheBuilder.cs index db92e20..6240854 100644 --- a/src/DotRecast.Detour.TileCache/DtTileCacheBuilder.cs +++ b/src/DotRecast.Detour.TileCache/DtTileCacheBuilder.cs @@ -24,7 +24,7 @@ using System.IO; using DotRecast.Core; using DotRecast.Core.Numerics; using DotRecast.Detour.TileCache.Io; -using DotRecast.Detour.TileCache.Io.Compress; +using DotRecast.Recast; namespace DotRecast.Detour.TileCache @@ -46,10 +46,10 @@ namespace DotRecast.Detour.TileCache Array.Fill(layer.regs, (short)0x00FF); int nsweeps = w; - DtLayerSweepSpan[] sweeps = new DtLayerSweepSpan[nsweeps]; + RcLayerSweepSpan[] sweeps = new RcLayerSweepSpan[nsweeps]; for (int i = 0; i < sweeps.Length; i++) { - sweeps[i] = new DtLayerSweepSpan(); + sweeps[i] = new RcLayerSweepSpan(); } // Partition walkable area into monotone regions. diff --git a/src/DotRecast.Recast/RcLayerRegion.cs b/src/DotRecast.Recast/RcLayerRegion.cs index 7de3803..7c94007 100644 --- a/src/DotRecast.Recast/RcLayerRegion.cs +++ b/src/DotRecast.Recast/RcLayerRegion.cs @@ -5,11 +5,11 @@ namespace DotRecast.Recast public class RcLayerRegion { public int id; - public int layerId; - public bool @base; + public int layerId; // Layer ID + public bool @base; // Flag indicating if the region is the base of merged regions. public int ymin, ymax; - public List layers; - public List neis; + public List layers; // Layer count + public List neis; // Neighbour count public RcLayerRegion(int i) { diff --git a/src/DotRecast.Detour.TileCache/DtLayerSweepSpan.cs b/src/DotRecast.Recast/RcLayerSweepSpan.cs similarity index 63% rename from src/DotRecast.Detour.TileCache/DtLayerSweepSpan.cs rename to src/DotRecast.Recast/RcLayerSweepSpan.cs index c14167b..f0c2a7d 100644 --- a/src/DotRecast.Detour.TileCache/DtLayerSweepSpan.cs +++ b/src/DotRecast.Recast/RcLayerSweepSpan.cs @@ -1,6 +1,6 @@ -namespace DotRecast.Detour.TileCache +namespace DotRecast.Recast { - public class DtLayerSweepSpan + public class RcLayerSweepSpan { public int ns; // number samples public int id; // region id diff --git a/src/DotRecast.Recast/RcLayers.cs b/src/DotRecast.Recast/RcLayers.cs index 7b347a9..b09c9b4 100644 --- a/src/DotRecast.Recast/RcLayers.cs +++ b/src/DotRecast.Recast/RcLayers.cs @@ -62,10 +62,10 @@ namespace DotRecast.Recast int[] srcReg = new int[chf.spanCount]; Array.Fill(srcReg, 0xFF); int nsweeps = chf.width; // Math.Max(chf.width, chf.height); - RcSweepSpan[] sweeps = new RcSweepSpan[nsweeps]; + RcLayerSweepSpan[] sweeps = new RcLayerSweepSpan[nsweeps]; for (int i = 0; i < sweeps.Length; i++) { - sweeps[i] = new RcSweepSpan(); + sweeps[i] = new RcLayerSweepSpan(); } // Partition walkable area into monotone regions. @@ -269,11 +269,11 @@ namespace DotRecast.Recast // Skip already visited. if (regn.layerId != 0xff) continue; - + // Skip if the neighbour is overlapping root region. if (Contains(root.layers, nei)) continue; - + // Skip if the height range would become too large. int ymin = Math.Min(root.ymin, regn.ymin); int ymax = Math.Max(root.ymax, regn.ymax);