rename DtLayerSweepSpan to RcLayerSweepSpan

This commit is contained in:
ikpil 2024-01-09 14:08:39 +09:00 committed by Ikpil
parent f51f2479ba
commit ebca91e64d
4 changed files with 13 additions and 13 deletions

View File

@ -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.

View File

@ -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<int> layers;
public List<int> neis;
public List<int> layers; // Layer count
public List<int> neis; // Neighbour count
public RcLayerRegion(int i)
{

View File

@ -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

View File

@ -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);