Added simple Detour navmesh flood fill and prune tool.

This commit is contained in:
Mikko Mononen
2011-09-11 11:08:55 +00:00
parent 751cf50af8
commit 54e0e86ff2
8 changed files with 415 additions and 3 deletions
+6
View File
@@ -32,6 +32,7 @@
#include "DetourNavMeshBuilder.h"
#include "DetourDebugDraw.h"
#include "NavMeshTesterTool.h"
#include "NavMeshPruneTool.h"
#include "OffMeshConnectionTool.h"
#include "ConvexVolumeTool.h"
#include "CrowdTool.h"
@@ -412,6 +413,10 @@ void Sample_TileMesh::handleTools()
{
setTool(new NavMeshTesterTool);
}
if (imguiCheck("Prune Navmesh", type == TOOL_NAVMESH_PRUNE))
{
setTool(new NavmeshPruneTool);
}
if (imguiCheck("Create Tiles", type == TOOL_TILE_EDIT))
{
setTool(new NavMeshTileTool);
@@ -575,6 +580,7 @@ void Sample_TileMesh::handleRender()
duDebugDrawNavMeshPortals(&dd, *m_navMesh);
if (m_drawMode == DRAWMODE_NAVMESH_NODES)
duDebugDrawNavMeshNodes(&dd, *m_navQuery);
duDebugDrawNavMeshPolysWithFlags(&dd, *m_navMesh, SAMPLE_POLYFLAGS_DISABLED, duRGBA(0,0,0,128));
}