forked from mirror/DotRecast
Changed 'reg', 'area' arrays to byte arrays for uniformity and efficiency in DtTileCacheContour
This commit is contained in:
parent
b88b6096f6
commit
650849b11b
|
@ -15,7 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
### Changed
|
||||
- Changed to reuse samples and edges list in BuildPolyDetail()
|
||||
- Changed 'heights', 'areas', 'cons', and 'regs' arrays to byte arrays for uniformity and efficiency in DtTileCacheLayer
|
||||
|
||||
- Changed 'reg', 'area' arrays to byte arrays for uniformity and efficiency in DtTileCacheContour
|
||||
|
||||
### Removed
|
||||
- Removed RcMeshDetails.VdistSq2(float[], float[])
|
||||
- Removed RcVecUtils.Dot()
|
||||
|
|
|
@ -655,7 +655,7 @@ namespace DotRecast.Detour.TileCache
|
|||
for (int x = 0; x < w; ++x)
|
||||
{
|
||||
int idx = x + y * w;
|
||||
int ri = layer.regs[idx];
|
||||
byte ri = layer.regs[idx];
|
||||
if (ri == 0xff)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace DotRecast.Detour.TileCache
|
|||
{
|
||||
public int nverts;
|
||||
public int[] verts;
|
||||
public int reg;
|
||||
public int area;
|
||||
public byte reg;
|
||||
public byte area;
|
||||
}
|
||||
}
|
|
@ -23,24 +23,13 @@ namespace DotRecast.Detour.TileCache
|
|||
public class DtTileCachePolyMesh
|
||||
{
|
||||
public int nvp;
|
||||
public int nverts;
|
||||
public int nverts; // < Number of vertices.
|
||||
public int npolys; // < Number of polygons.
|
||||
public int[] verts; // < Vertices of the mesh, 3 elements per vertex.
|
||||
public int[] polys; // < Polygons of the mesh, nvp*2 elements per polygon.
|
||||
public int[] flags; // < Per polygon flags.
|
||||
public int[] areas; // < Area ID of polygons.
|
||||
|
||||
/// < Number of vertices.
|
||||
public int npolys;
|
||||
|
||||
/// < Number of polygons.
|
||||
public int[] verts;
|
||||
|
||||
/// < Vertices of the mesh, 3 elements per vertex.
|
||||
public int[] polys;
|
||||
|
||||
/// < Polygons of the mesh, nvp*2 elements per polygon.
|
||||
public int[] flags;
|
||||
|
||||
/// < Per polygon flags.
|
||||
public int[] areas;
|
||||
|
||||
/// < Area ID of polygons.
|
||||
public DtTileCachePolyMesh(int nvp)
|
||||
{
|
||||
this.nvp = nvp;
|
||||
|
|
Loading…
Reference in New Issue