The ugly and humble beginnings of path following and multi-agent navigation code.

This commit is contained in:
Mikko Mononen
2010-08-12 12:54:00 +00:00
parent 474a3ddc67
commit 7d8fe75de1
25 changed files with 8777 additions and 377 deletions
+8 -1
View File
@@ -35,6 +35,7 @@
#include "NavMeshTesterTool.h"
#include "OffMeshConnectionTool.h"
#include "ConvexVolumeTool.h"
#include "CrowdTool.h"
#ifdef WIN32
# define snprintf _snprintf
@@ -78,7 +79,7 @@ public:
imguiValue("Click LMB to highlight a tile.");
}
virtual void handleClick(const float* p, bool /*shift*/)
virtual void handleClick(const float* /*s*/, const float* p, bool /*shift*/)
{
m_hitPosSet = true;
rcVcopy(m_hitPos,p);
@@ -88,6 +89,8 @@ public:
virtual void handleStep() {}
virtual void handleUpdate(const float dt) {}
virtual void handleRender()
{
if (m_hitPosSet)
@@ -215,6 +218,10 @@ void Sample_SoloMeshTiled::handleTools()
{
setTool(new ConvexVolumeTool);
}
if (imguiCheck("Create Crowds", type == TOOL_CROWD))
{
setTool(new CrowdTool);
}
if (imguiCheck("Highlight Tile", type == TOOL_TILE_HIGHLIGHT))
{
setTool(new TileHighlightTool);