mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-09-15 06:44:34 +00:00
Humble beginnings of box volume too. Allow to save and restore GeomInput state.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "DetourDebugDraw.h"
|
||||
#include "NavMeshTesterTool.h"
|
||||
#include "OffMeshConnectionTool.h"
|
||||
#include "BoxVolumeTool.h"
|
||||
|
||||
#ifdef WIN32
|
||||
# define snprintf _snprintf
|
||||
@@ -99,6 +100,10 @@ void Sample_SoloMeshSimple::handleTools()
|
||||
{
|
||||
setTool(new OffMeshConnectionTool);
|
||||
}
|
||||
if (imguiCheck("Create Box Volumes", type == TOOL_BOX_VOLUME))
|
||||
{
|
||||
setTool(new BoxVolumeTool);
|
||||
}
|
||||
|
||||
imguiSeparator();
|
||||
|
||||
@@ -198,6 +203,7 @@ void Sample_SoloMeshSimple::handleRender()
|
||||
m_geom->getMesh()->getTris(), m_geom->getMesh()->getNormals(), m_geom->getMesh()->getTriCount(),
|
||||
m_agentMaxSlope);
|
||||
m_geom->drawOffMeshConnections(&dd);
|
||||
m_geom->drawBoxVolumes(&dd);
|
||||
}
|
||||
else if (m_drawMode != DRAWMODE_NAVMESH_TRANS)
|
||||
{
|
||||
@@ -205,6 +211,7 @@ void Sample_SoloMeshSimple::handleRender()
|
||||
duDebugDrawTriMesh(&dd, m_geom->getMesh()->getVerts(), m_geom->getMesh()->getVertCount(),
|
||||
m_geom->getMesh()->getTris(), m_geom->getMesh()->getNormals(), m_geom->getMesh()->getTriCount(), 0);
|
||||
m_geom->drawOffMeshConnections(&dd);
|
||||
m_geom->drawBoxVolumes(&dd);
|
||||
}
|
||||
|
||||
glDisable(GL_FOG);
|
||||
|
||||
Reference in New Issue
Block a user