mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-10-01 06:25:34 +00:00
Add toggles for heightfield filtering
This commit is contained in:
committed by
Ben Hymers
parent
a2e16b8e6c
commit
12e8950bac
@@ -42,7 +42,10 @@ Sample::Sample() :
|
||||
m_crowd(0),
|
||||
m_navMeshDrawFlags(DU_DRAWNAVMESH_OFFMESHCONS|DU_DRAWNAVMESH_CLOSEDLIST),
|
||||
m_tool(0),
|
||||
m_ctx(0)
|
||||
m_ctx(0),
|
||||
m_filterLowHangingObstacles(true),
|
||||
m_filterLedgeSpans(true),
|
||||
m_filterWalkableLowHeightSpans(true)
|
||||
{
|
||||
resetCommonSettings();
|
||||
m_navQuery = dtAllocNavMeshQuery();
|
||||
@@ -201,6 +204,15 @@ void Sample::handleCommonSettings()
|
||||
if (imguiCheck("Layers", m_partitionType == SAMPLE_PARTITION_LAYERS))
|
||||
m_partitionType = SAMPLE_PARTITION_LAYERS;
|
||||
|
||||
imguiSeparator();
|
||||
imguiLabel("Filtering");
|
||||
if (imguiCheck("Low Hanging Obstacles", m_filterLowHangingObstacles))
|
||||
m_filterLowHangingObstacles = !m_filterLowHangingObstacles;
|
||||
if (imguiCheck("Ledge Spans", m_filterLedgeSpans))
|
||||
m_filterLedgeSpans= !m_filterLedgeSpans;
|
||||
if (imguiCheck("Walkable Low Height Spans", m_filterWalkableLowHeightSpans))
|
||||
m_filterWalkableLowHeightSpans = !m_filterWalkableLowHeightSpans;
|
||||
|
||||
imguiSeparator();
|
||||
imguiLabel("Polygonization");
|
||||
imguiSlider("Max Edge Length", &m_edgeMaxLen, 0.0f, 50.0f, 1.0f);
|
||||
|
||||
Reference in New Issue
Block a user