forked from bit/DotRecastNetSim
class to struct DtNavMeshParams, DtTileCacheSetHeader, DtTileCacheParam
This commit is contained in:
parent
c353672a09
commit
e8e64ea351
|
@ -22,16 +22,15 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using DotRecast.Core;
|
||||
using DotRecast.Detour.TileCache.Io;
|
||||
using static DotRecast.Core.RcMath;
|
||||
|
||||
namespace DotRecast.Detour.TileCache
|
||||
{
|
||||
public class DtTileCache
|
||||
{
|
||||
int m_tileLutSize;
|
||||
private int m_tileLutSize;
|
||||
|
||||
/// < Tile hash lookup size (must be pot).
|
||||
int m_tileLutMask;
|
||||
private int m_tileLutMask;
|
||||
|
||||
/// < Tile hash lookup mask.
|
||||
private readonly DtCompressedTile[] m_posLookup;
|
||||
|
@ -719,9 +718,9 @@ namespace DotRecast.Detour.TileCache
|
|||
}
|
||||
}
|
||||
|
||||
public DtTileCacheParams GetParams()
|
||||
public ref readonly DtTileCacheParams GetParams()
|
||||
{
|
||||
return m_params;
|
||||
return ref m_params;
|
||||
}
|
||||
|
||||
public IRcCompressor GetCompressor()
|
||||
|
|
|
@ -22,9 +22,9 @@ using DotRecast.Core;
|
|||
|
||||
namespace DotRecast.Detour.TileCache
|
||||
{
|
||||
public class DtTileCacheParams
|
||||
public struct DtTileCacheParams
|
||||
{
|
||||
public RcVec3f orig = new RcVec3f();
|
||||
public RcVec3f orig;
|
||||
public float cs, ch;
|
||||
public int width, height;
|
||||
public float walkableHeight;
|
||||
|
|
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||
|
||||
namespace DotRecast.Detour.TileCache.Io
|
||||
{
|
||||
public class DtTileCacheSetHeader
|
||||
public struct DtTileCacheSetHeader
|
||||
{
|
||||
public const int TILECACHESET_MAGIC = 'T' << 24 | 'S' << 16 | 'E' << 8 | 'T'; // 'TSET';
|
||||
public const int TILECACHESET_VERSION = 1;
|
||||
|
@ -29,7 +29,7 @@ namespace DotRecast.Detour.TileCache.Io
|
|||
public int magic;
|
||||
public int version;
|
||||
public int numTiles;
|
||||
public DtNavMeshParams meshParams = new DtNavMeshParams();
|
||||
public DtTileCacheParams cacheParams = new DtTileCacheParams();
|
||||
public DtNavMeshParams meshParams;
|
||||
public DtTileCacheParams cacheParams;
|
||||
}
|
||||
}
|
|
@ -324,9 +324,9 @@ namespace DotRecast.Detour
|
|||
return true;
|
||||
}
|
||||
|
||||
public DtNavMeshParams GetParams()
|
||||
public ref readonly DtNavMeshParams GetParams()
|
||||
{
|
||||
return m_params;
|
||||
return ref m_params;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@ namespace DotRecast.Detour
|
|||
*
|
||||
* @see NavMesh
|
||||
*/
|
||||
public class DtNavMeshParams
|
||||
public struct DtNavMeshParams
|
||||
{
|
||||
/** The world space origin of the navigation mesh's tile space. [(x, y, z)] */
|
||||
public RcVec3f orig = new RcVec3f();
|
||||
public RcVec3f orig;
|
||||
|
||||
/** The width of each tile. (Along the x-axis.) */
|
||||
public float tileWidth;
|
||||
|
|
Loading…
Reference in New Issue