Missing changes from previous commit. Added dtNavMesh.findLocalNeighbourhood() and dtNavMesh.getPolyWallSegments() and test code for them.

This commit is contained in:
Mikko Mononen
2010-08-09 13:28:26 +00:00
parent 1c4755012f
commit 81c0402116
10 changed files with 2015 additions and 352 deletions

View File

@@ -385,7 +385,7 @@ static void calcRect(const float* va, const float* vb,
static void drawMeshTilePortal(duDebugDraw* dd, const dtMeshTile* tile)
{
// Draw portals
const float padx = 0.01f;
const float padx = 0.02f;
const float pady = tile->header->walkableClimb;
dd->begin(DU_DRAW_LINES, 2.0f);
@@ -414,7 +414,7 @@ static void drawMeshTilePortal(duDebugDraw* dd, const dtMeshTile* tile)
{
unsigned int col = side == 0 ? duRGBA(128,0,0,128) : duRGBA(128,0,128,128);
const float x = va[0] + ((side == 0) ? -0.02f : 0.02f);
const float x = va[0] + ((side == 0) ? -padx : padx);
dd->vertex(x,va[1]-pady,va[2], col);
dd->vertex(x,va[1]+pady,va[2], col);
@@ -450,7 +450,7 @@ static void drawMeshTilePortal(duDebugDraw* dd, const dtMeshTile* tile)
{
unsigned int col = side == 2 ? duRGBA(0,128,0,128) : duRGBA(0,128,128,128);
const float z = va[2] + ((side == 2) ? -0.02f : 0.02f);
const float z = va[2] + ((side == 2) ? -padx : padx);
dd->vertex(va[0],va[1]-pady,z, col);
dd->vertex(va[0],va[1]+pady,z, col);