Fix for Issue 99:Separate Detour mesh queries in to a different class from mesh data

This commit is contained in:
Mikko Mononen
2010-08-17 15:10:32 +00:00
parent 7d8fe75de1
commit cbc47f4ddf
26 changed files with 4838 additions and 16039 deletions

View File

@@ -24,6 +24,8 @@
#include "Recast.h"
#include "RecastDebugDraw.h"
#include "DetourDebugDraw.h"
#include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h"
#include "imgui.h"
#include "SDL.h"
#include "SDL_opengl.h"
@@ -137,15 +139,18 @@ bool FileIO::read(void* ptr, const size_t size)
Sample::Sample() :
m_geom(0),
m_navMesh(0),
m_navMeshDrawFlags(DU_DRAWNAVMESH_CLOSEDLIST|DU_DRAWNAVMESH_OFFMESHCONS),
m_navQuery(0),
m_navMeshDrawFlags(DU_DRAWNAVMESH_OFFMESHCONS),
m_tool(0)
{
resetCommonSettings();
m_navQuery = dtAllocNavMeshQuery();
}
Sample::~Sample()
{
delete m_navMesh;
dtFreeNavMeshQuery(m_navQuery);
dtFreeNavMesh(m_navMesh);
delete m_tool;
}