Area progress: Pass area type and ability flags to recast. Convex Area tool. Mark chf with convex volumes. Better visualization of volumes.

This commit is contained in:
Mikko Mononen
2010-02-05 16:15:49 +00:00
parent 8561fb6d00
commit a715e9a5f7
21 changed files with 5324 additions and 655 deletions
+36 -9
View File
@@ -60,7 +60,7 @@ NavMeshTesterTool::NavMeshTesterTool() :
m_sposSet(false),
m_eposSet(false)
{
m_filter.includeFlags = DT_POLY_GROUND | DT_POLY_OFFMESH_CONNECTION;
m_filter.includeFlags = SAMPLE_POLYFLAGS_ALL;
m_filter.excludeFlags = 0;
m_polyPickExt[0] = 2;
@@ -127,29 +127,56 @@ void NavMeshTesterTool::handleMenu()
imguiLabel("Include Flags");
if (imguiCheck("Ground", (m_filter.includeFlags & DT_POLY_GROUND) ? true : false))
imguiIndent();
if (imguiCheck("Walk", (m_filter.includeFlags & SAMPLE_POLYFLAGS_WALK) != 0))
{
m_filter.includeFlags ^= DT_POLY_GROUND;
m_filter.includeFlags ^= SAMPLE_POLYFLAGS_WALK;
recalc();
}
if (imguiCheck("Off-Mesh Connections", (m_filter.includeFlags & DT_POLY_OFFMESH_CONNECTION) ? true : false))
if (imguiCheck("Swim", (m_filter.includeFlags & SAMPLE_POLYFLAGS_SWIM) != 0))
{
m_filter.includeFlags ^= DT_POLY_OFFMESH_CONNECTION;
m_filter.includeFlags ^= SAMPLE_POLYFLAGS_SWIM;
recalc();
}
if (imguiCheck("Door", (m_filter.includeFlags & SAMPLE_POLYFLAGS_DOOR) != 0))
{
m_filter.includeFlags ^= SAMPLE_POLYFLAGS_DOOR;
recalc();
}
if (imguiCheck("Jump", (m_filter.includeFlags & SAMPLE_POLYFLAGS_JUMP) != 0))
{
m_filter.includeFlags ^= SAMPLE_POLYFLAGS_JUMP;
recalc();
}
imguiUnindent();
imguiSeparator();
imguiLabel("Exclude Flags");
if (imguiCheck("Ground", (m_filter.excludeFlags & DT_POLY_GROUND) ? true : false))
imguiIndent();
if (imguiCheck("Walk", (m_filter.excludeFlags & SAMPLE_POLYFLAGS_WALK) != 0))
{
m_filter.excludeFlags ^= DT_POLY_GROUND;
m_filter.excludeFlags ^= SAMPLE_POLYFLAGS_WALK;
recalc();
}
if (imguiCheck("Off-Mesh Connections", (m_filter.excludeFlags & DT_POLY_OFFMESH_CONNECTION) ? true : false))
if (imguiCheck("Swim", (m_filter.excludeFlags & SAMPLE_POLYFLAGS_SWIM) != 0))
{
m_filter.excludeFlags ^= DT_POLY_OFFMESH_CONNECTION;
m_filter.excludeFlags ^= SAMPLE_POLYFLAGS_SWIM;
recalc();
}
if (imguiCheck("Door", (m_filter.excludeFlags & SAMPLE_POLYFLAGS_DOOR) != 0))
{
m_filter.excludeFlags ^= SAMPLE_POLYFLAGS_DOOR;
recalc();
}
if (imguiCheck("Jump", (m_filter.excludeFlags & SAMPLE_POLYFLAGS_JUMP) != 0))
{
m_filter.excludeFlags ^= SAMPLE_POLYFLAGS_JUMP;
recalc();
}
imguiUnindent();
imguiSeparator();
if (m_toolMode == TOOLMODE_PATHFIND_ITER || m_toolMode == TOOLMODE_PATHFIND_STRAIGHT)
{