forked from mirror/DotRecast
rename DtLayerSweepSpan to RcLayerSweepSpan
This commit is contained in:
parent
f51f2479ba
commit
ebca91e64d
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue