This commit is contained in:
aozhiwei 2020-08-13 21:11:37 +08:00
parent e18ba7c803
commit f7951cb780
2 changed files with 43 additions and 43 deletions

View File

@ -21,49 +21,6 @@
#include "navmeshhelper.h"
struct BuilderParams
{
float kCellSize = 64;
const float kCellHeight = 64;
const float kAgentMaxSlope = 90;
const float kAgentHeight = 1;
const float kAgentMaxClimb = 1;
const float kAgentRadius = 40;
const float kEdgeMaxLen = 6;
const float kEdgeMaxError = 6;
const float kRegionMinSize = 6;
const float kRegionMergeSize = 6;
const int kVertsPerPoly = 1;
const int kTileSize = 48;
const float kDetailSampleDist = 1;
const float kDetailSampleMaxError = 1;
const int kMaxTiles = 0;
const int kMaxPolysPerTile = 0;
const float* bmin = nullptr;
const float* bmax = nullptr;
rcConfig cfg;
dtTileCacheParams tcparams;
MapInstance* map_instance = nullptr;
LinearAllocator* talloc = nullptr;
FastLZCompressor* tcomp = nullptr;
MeshProcess* tmproc = nullptr;
dtTileCache* tile_cache = nullptr;
dtNavMesh* navmesh = nullptr;
int gw = 0;
int gh = 0;
int ts = 0;
int tw = 0;
int th = 0;
};
void NavMeshBuilder::Init()
{

View File

@ -234,3 +234,46 @@ struct MeshProcess : public dtTileCacheMeshProcess
#endif
}
};
struct BuilderParams
{
float kCellSize = 64;
const float kCellHeight = 64;
const float kAgentMaxSlope = 90;
const float kAgentHeight = 1;
const float kAgentMaxClimb = 1;
const float kAgentRadius = 40;
const float kEdgeMaxLen = 6;
const float kEdgeMaxError = 6;
const float kRegionMinSize = 6;
const float kRegionMergeSize = 6;
const int kVertsPerPoly = 1;
const int kTileSize = 48;
const float kDetailSampleDist = 1;
const float kDetailSampleMaxError = 1;
const int kMaxTiles = 0;
const int kMaxPolysPerTile = 0;
const float* bmin = nullptr;
const float* bmax = nullptr;
rcConfig cfg;
dtTileCacheParams tcparams;
MapInstance* map_instance = nullptr;
LinearAllocator* talloc = nullptr;
FastLZCompressor* tcomp = nullptr;
MeshProcess* tmproc = nullptr;
dtTileCache* tile_cache = nullptr;
dtNavMesh* navmesh = nullptr;
int gw = 0;
int gh = 0;
int ts = 0;
int tw = 0;
int th = 0;
};