added converting mesh of game object to Detour StatNavMesh (game object is defined by property "navmesh")
This commit is contained in:
@@ -26,4 +26,8 @@ bool dtCreateNavMeshData(const unsigned short* verts, const int nverts,
|
||||
const unsigned char* dtris, const int ndtris,
|
||||
unsigned char** outData, int* outDataSize);
|
||||
|
||||
int createBVTree(const unsigned short* verts, const int nverts,
|
||||
const unsigned short* polys, const int npolys, const int nvp,
|
||||
float cs, float ch, int nnodes, dtStatBVNode* nodes);
|
||||
|
||||
#endif // DETOURSTATNAVMESHBUILDER_H
|
@@ -160,7 +160,7 @@ static void subdivide(BVItem* items, int nitems, int imin, int imax, int& curNod
|
||||
}
|
||||
}
|
||||
|
||||
static int createBVTree(const unsigned short* verts, const int nverts,
|
||||
/*static*/ int createBVTree(const unsigned short* verts, const int nverts,
|
||||
const unsigned short* polys, const int npolys, const int nvp,
|
||||
float cs, float ch,
|
||||
int nnodes, dtStatBVNode* nodes)
|
||||
|
@@ -496,5 +496,6 @@ bool rcBuildPolyMeshDetail(const rcPolyMesh& mesh, const rcCompactHeightfield& c
|
||||
|
||||
bool rcMergePolyMeshDetails(rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh);
|
||||
|
||||
bool buildMeshAdjacency(unsigned short* polys, const int npolys, const int nverts, const int vertsPerPoly);
|
||||
|
||||
#endif // RECAST_H
|
||||
|
@@ -32,7 +32,7 @@ struct rcEdge
|
||||
unsigned short poly[2];
|
||||
};
|
||||
|
||||
static bool buildMeshAdjacency(unsigned short* polys, const int npolys,
|
||||
/*static */bool buildMeshAdjacency(unsigned short* polys, const int npolys,
|
||||
const int nverts, const int vertsPerPoly)
|
||||
{
|
||||
// Based on code by Eric Lengyel from:
|
||||
|
Reference in New Issue
Block a user