Custom memory allocator for Detour. Fixed parallel touching portal connection.

This commit is contained in:
Mikko Mononen 2010-07-09 10:37:49 +00:00
parent fb369a2efd
commit e5cca88cd1
17 changed files with 4745 additions and 3328 deletions

View File

@ -0,0 +1,36 @@
//
// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
//
#ifndef DETOURALLOCATOR_H
#define DETOURALLOCATOR_H
enum dtAllocHint
{
DT_ALLOC_PERM, // Memory persist after a function call.
DT_ALLOC_TEMP // Memory used temporarily within a function.
};
typedef void* (dtAllocFunc)(int size, dtAllocHint hint);
typedef void (dtFreeFunc)(void* ptr);
void dtAllocSetCustom(dtAllocFunc *allocFunc, dtFreeFunc *freeFunc);
void* dtAlloc(int size, dtAllocHint hint);
void dtFree(void* ptr);
#endif

View File

@ -19,8 +19,6 @@
#ifndef DETOURCOMMON_H
#define DETOURCOMMON_H
//////////////////////////////////////////////////////////////////////////////////////////
template<class T> inline void dtSwap(T& a, T& b) { T t = a; a = b; b = t; }
template<class T> inline T dtMin(T a, T b) { return a < b ? a : b; }
template<class T> inline T dtMax(T a, T b) { return a > b ? a : b; }
@ -28,6 +26,8 @@ template<class T> inline T dtAbs(T a) { return a < 0 ? -a : a; }
template<class T> inline T dtSqr(T a) { return a*a; }
template<class T> inline T dtClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); }
float dtSqrt(float x);
inline void dtVcross(float* dest, const float* v1, const float* v2)
{
dest[0] = v1[1]*v2[2] - v1[2]*v2[1];
@ -94,7 +94,7 @@ inline float dtVdist(const float* v1, const float* v2)
float dx = v2[0] - v1[0];
float dy = v2[1] - v1[1];
float dz = v2[2] - v1[2];
return sqrtf(dx*dx + dy*dy + dz*dz);
return dtSqrt(dx*dx + dy*dy + dz*dz);
}
inline float dtVdistSqr(const float* v1, const float* v2)
@ -107,7 +107,7 @@ inline float dtVdistSqr(const float* v1, const float* v2)
inline void dtVnormalize(float* v)
{
float d = 1.0f / sqrtf(dtSqr(v[0]) + dtSqr(v[1]) + dtSqr(v[2]));
float d = 1.0f / dtSqrt(dtSqr(v[0]) + dtSqr(v[1]) + dtSqr(v[2]));
v[0] *= d;
v[1] *= d;
v[2] *= d;

View File

@ -19,6 +19,8 @@
#ifndef DETOURNAVMESH_H
#define DETOURNAVMESH_H
#include "DetourAlloc.h"
// Reference to navigation polygon.
typedef unsigned int dtPolyRef;
@ -546,4 +548,8 @@ private:
class dtNodeQueue* m_openList; // Pointer to open list queue.
};
// Helper function to allocate navmesh class using Detour allocator.
dtNavMesh* dtAllocNavMesh();
void dtFreeNavMesh(dtNavMesh* navmesh);
#endif // DETOURNAVMESH_H

View File

@ -19,9 +19,11 @@
#ifndef DETOURNAVMESHBUILDER_H
#define DETOURNAVMESHBUILDER_H
#include "DetourAlloc.h"
// The units of the parameters are specified in parenthesis as follows:
// (vx) voxels, (wu) world units
struct dtNavMeshCreateParams
{
// Navmesh vertices.

View File

@ -0,0 +1,49 @@
//
// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
//
#include <stdlib.h>
#include "DetourAlloc.h"
static void *dtAllocDefault(int size, dtAllocHint)
{
return malloc(size);
}
static void dtFreeDefault(void *ptr)
{
free(ptr);
}
static dtAllocFunc* sAllocFunc = dtAllocDefault;
static dtFreeFunc* sFreeFunc = dtFreeDefault;
void dtAllocSetCustom(dtAllocFunc *allocFunc, dtFreeFunc *freeFunc)
{
sAllocFunc = allocFunc ? allocFunc : dtAllocDefault;
sFreeFunc = freeFunc ? freeFunc : dtFreeDefault;
}
void* dtAlloc(int size, dtAllocHint hint)
{
return sAllocFunc(size, hint);
}
void dtFree(void* ptr)
{
sFreeFunc(ptr);
}

View File

@ -19,6 +19,13 @@
#include <math.h>
#include "DetourCommon.h"
//////////////////////////////////////////////////////////////////////////////////////////
float dtSqrt(float x)
{
return sqrtf(x);
}
void dtClosestPtPointTriangle(float* closest, const float* p,
const float* a, const float* b, const float* c)
{

View File

@ -23,6 +23,8 @@
#include "DetourNavMesh.h"
#include "DetourNode.h"
#include "DetourCommon.h"
#include "DetourAlloc.h"
#include <new>
inline int opposite(int side) { return (side+4) & 0x7; }
@ -51,8 +53,10 @@ inline bool overlapSlabs(const float* amin, const float* amax,
const float px, const float py)
{
// Check for horizontal overlap.
const float minx = dtMax(amin[0]-px,bmin[0]-px);
const float maxx = dtMin(amax[0]+px,bmax[0]+px);
// The segment is shrunken a little so that slabs which touch
// at end points are not connected.
const float minx = dtMax(amin[0]+px,bmin[0]+px);
const float maxx = dtMin(amax[0]-px,bmax[0]-px);
if (minx > maxx)
return false;
@ -147,7 +151,17 @@ inline bool passFilter(const dtQueryFilter* filter, unsigned short flags)
return (flags & filter->includeFlags) != 0 && (flags & filter->excludeFlags) == 0;
}
dtNavMesh* dtAllocNavMesh()
{
return new(dtAlloc(sizeof(dtNavMesh), DT_ALLOC_PERM)) dtNavMesh;
}
void dtFreeNavMesh(dtNavMesh* navmesh)
{
if (!navmesh) return;
navmesh->~dtNavMesh();
dtFree(navmesh);
}
//////////////////////////////////////////////////////////////////////////////////////////
dtNavMesh::dtNavMesh() :
@ -179,15 +193,17 @@ dtNavMesh::~dtNavMesh()
{
if (m_tiles[i].flags & DT_TILE_FREE_DATA)
{
delete [] m_tiles[i].data;
dtFree(m_tiles[i].data);
m_tiles[i].data = 0;
m_tiles[i].dataSize = 0;
}
}
delete m_nodePool;
delete m_openList;
delete [] m_posLookup;
delete [] m_tiles;
m_nodePool->~dtNodePool();
m_openList->~dtNodeQueue();
dtFree(m_nodePool);
dtFree(m_openList);
dtFree(m_posLookup);
dtFree(m_tiles);
}
bool dtNavMesh::init(const dtNavMeshParams* params)
@ -203,10 +219,10 @@ bool dtNavMesh::init(const dtNavMeshParams* params)
if (!m_tileLutSize) m_tileLutSize = 1;
m_tileLutMask = m_tileLutSize-1;
m_tiles = new dtMeshTile[m_maxTiles];
m_tiles = (dtMeshTile*)dtAlloc(sizeof(dtMeshTile)*m_maxTiles, DT_ALLOC_PERM);
if (!m_tiles)
return false;
m_posLookup = new dtMeshTile*[m_tileLutSize];
m_posLookup = (dtMeshTile**)dtAlloc(sizeof(dtMeshTile*)*m_tileLutSize, DT_ALLOC_PERM);
if (!m_posLookup)
return false;
memset(m_tiles, 0, sizeof(dtMeshTile)*m_maxTiles);
@ -219,16 +235,18 @@ bool dtNavMesh::init(const dtNavMeshParams* params)
m_nextFree = &m_tiles[i];
}
// TODO: check the node pool size too.
if (!m_nodePool)
{
m_nodePool = new dtNodePool(params->maxNodes, dtNextPow2(params->maxNodes/4));
m_nodePool = new (dtAlloc(sizeof(dtNodePool), DT_ALLOC_PERM)) dtNodePool(params->maxNodes, dtNextPow2(params->maxNodes/4));
if (!m_nodePool)
return false;
}
// TODO: check the open list size too.
if (!m_openList)
{
m_openList = new dtNodeQueue(params->maxNodes);
m_openList = new (dtAlloc(sizeof(dtNodeQueue), DT_ALLOC_PERM)) dtNodeQueue(params->maxNodes);
if (!m_openList)
return false;
}

View File

@ -23,6 +23,7 @@
#include "DetourNavMesh.h"
#include "DetourCommon.h"
#include "DetourNavMeshBuilder.h"
#include "DetourAlloc.h"
static unsigned short MESH_NULL_IDX = 0xffff;
@ -172,7 +173,7 @@ static int createBVTree(const unsigned short* verts, const int /*nverts*/,
const int /*nnodes*/, dtBVNode* nodes)
{
// Build tree
BVItem* items = new BVItem[npolys];
BVItem* items = (BVItem*)dtAlloc(sizeof(BVItem)*npolys, DT_ALLOC_TEMP);
for (int i = 0; i < npolys; i++)
{
BVItem& it = items[i];
@ -206,7 +207,7 @@ static int createBVTree(const unsigned short* verts, const int /*nverts*/,
int curNode = 0;
subdivide(items, npolys, 0, npolys, curNode, nodes);
delete [] items;
dtFree(items);
return curNode;
}
@ -263,7 +264,7 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData,
if (params->offMeshConCount > 0)
{
offMeshConClass = new unsigned char [params->offMeshConCount*2];
offMeshConClass = (unsigned char*)dtAlloc(sizeof(new unsigned char)*params->offMeshConCount*2, DT_ALLOC_TEMP);
if (!offMeshConClass)
return false;
@ -350,10 +351,10 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData,
detailMeshesSize + detailVertsSize + detailTrisSize +
bvTreeSize + offMeshConsSize;
unsigned char* data = new unsigned char[dataSize];
unsigned char* data = (unsigned char*)dtAlloc(sizeof(unsigned char)*dataSize, DT_ALLOC_PERM);
if (!data)
{
delete [] offMeshConClass;
dtFree(offMeshConClass);
return false;
}
memset(data, 0, dataSize);
@ -532,7 +533,7 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData,
}
}
delete [] offMeshConClass;
dtFree(offMeshConClass);
*outData = data;
*outDataSize = dataSize;
@ -540,9 +541,6 @@ bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData,
return true;
}
inline void swapByte(unsigned char* a, unsigned char* b)
{
unsigned char tmp = *a;

View File

@ -16,6 +16,7 @@
// 3. This notice may not be removed or altered from any source distribution.
//
#include "DetourAlloc.h"
#include "DetourNode.h"
#include <string.h>
@ -23,7 +24,6 @@ static const unsigned short DT_NULL_IDX = 0xffff;
//////////////////////////////////////////////////////////////////////////////////////////
dtNodePool::dtNodePool(int maxNodes, int hashSize) :
m_nodes(0),
m_first(0),
m_next(0),
@ -31,18 +31,19 @@ dtNodePool::dtNodePool(int maxNodes, int hashSize) :
m_hashSize(hashSize),
m_nodeCount(0)
{
m_nodes = new dtNode[m_maxNodes];
m_next = new unsigned short[m_maxNodes];
m_first = new unsigned short[hashSize];
m_nodes = (dtNode*)dtAlloc(sizeof(dtNode)*m_maxNodes, DT_ALLOC_PERM);
m_next = (unsigned short*)dtAlloc(sizeof(unsigned short)*m_maxNodes, DT_ALLOC_PERM);
m_first = (unsigned short*)dtAlloc(sizeof(unsigned short)*hashSize, DT_ALLOC_PERM);
memset(m_first, 0xff, sizeof(unsigned short)*m_hashSize);
memset(m_next, 0xff, sizeof(unsigned short)*m_maxNodes);
}
dtNodePool::~dtNodePool()
{
delete [] m_nodes;
delete [] m_next;
delete [] m_first;
dtFree(m_nodes);
dtFree(m_next);
dtFree(m_first);
}
void dtNodePool::clear()
@ -103,12 +104,12 @@ dtNodeQueue::dtNodeQueue(int n) :
m_capacity(n),
m_size(0)
{
m_heap = new dtNode*[m_capacity+1];
m_heap = (dtNode**)dtAlloc(sizeof(dtNode*)*(m_capacity+1), DT_ALLOC_PERM);
}
dtNodeQueue::~dtNodeQueue()
{
delete [] m_heap;
dtFree(m_heap);
}
void dtNodeQueue::bubbleUp(int i, dtNode* node)

File diff suppressed because it is too large Load Diff

View File

@ -200,8 +200,8 @@
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1256</integer>
<integer>1256</integer>
<integer>1173</integer>
<integer>1173</integer>
</array>
<key>Perspectives</key>
<array>
@ -282,14 +282,14 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>13</integer>
<integer>11</integer>
<integer>40</integer>
<integer>36</integer>
<integer>1</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 109}, {264, 643}}</string>
<string>{{0, 225}, {264, 632}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
@ -299,14 +299,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {281, 661}}</string>
<string>{{0, 0}, {281, 650}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>MainColumn</string>
<real>264</real>
</array>
<key>RubberWindowFrame</key>
<string>13 75 1256 702 0 0 1280 778 </string>
<string>33 87 1173 691 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@ -324,7 +324,7 @@
<key>PBXProjectModuleGUID</key>
<string>6B8632A30F78115100E2684A</string>
<key>PBXProjectModuleLabel</key>
<string>DetourNavMesh.cpp</string>
<string>Sample_TileMesh.cpp</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@ -332,14 +332,13 @@
<key>PBXProjectModuleGUID</key>
<string>6B8632A40F78115100E2684A</string>
<key>PBXProjectModuleLabel</key>
<string>DetourNavMesh.cpp</string>
<string>Sample_TileMesh.cpp</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>6B1001B311AD24020098A59A</string>
<string>6B98470311E7285500FA177B</string>
<key>history</key>
<array>
<string>6BBB4A96115B4F3400CF791D</string>
<string>6BBB4AA1115B4F3400CF791D</string>
<string>6BBB4AA4115B4F3400CF791D</string>
<string>6BBB4AA5115B4F3400CF791D</string>
@ -350,8 +349,6 @@
<string>6BBB4ABB115B4F3400CF791D</string>
<string>6BBB4ABF115B4F3400CF791D</string>
<string>6BBB4AC4115B4F3400CF791D</string>
<string>6BBB4ACB115B4F3400CF791D</string>
<string>6BBB4ACD115B4F3400CF791D</string>
<string>6BBB4B7F115B639200CF791D</string>
<string>6BBB4C34115B7A3D00CF791D</string>
<string>6BF5F27011747CFA000502A6</string>
@ -362,57 +359,58 @@
<string>6BF5F2E711748884000502A6</string>
<string>6BF5F31C117490A1000502A6</string>
<string>6BF5F32E11759C3C000502A6</string>
<string>6BF5F33111759C3C000502A6</string>
<string>6BF5F474117644A2000502A6</string>
<string>6BF5F475117644A2000502A6</string>
<string>6BF5F476117644A2000502A6</string>
<string>6BF5F478117644A2000502A6</string>
<string>6BF5F5041176F5F8000502A6</string>
<string>6BF5F50D1176F5F8000502A6</string>
<string>6B4214AB11802FAA006C347B</string>
<string>6B4214AD11802FAA006C347B</string>
<string>6B4214D911803923006C347B</string>
<string>6B4215CB118066FE006C347B</string>
<string>6B6F8E2311837A7400A069D7</string>
<string>6B6F8E2511837A7400A069D7</string>
<string>6B555F451191AA4400843384</string>
<string>6B55623D1193E79A00843384</string>
<string>6B5562501193EF2F00843384</string>
<string>6B5562511193EF2F00843384</string>
<string>6B5562841193EFC500843384</string>
<string>6B5562D41193F20700843384</string>
<string>6B5562DF1193F2A300843384</string>
<string>6B5562E01193F2A300843384</string>
<string>6B5562F41193F4CC00843384</string>
<string>6B5564031194187500843384</string>
<string>6B2CDC911197F0720090FA4D</string>
<string>6B2CDD23119804010090FA4D</string>
<string>6B2CDD3211980B820090FA4D</string>
<string>6B2CDD6111980E3D0090FA4D</string>
<string>6B2CDD6C119810560090FA4D</string>
<string>6B2CDD94119818F90090FA4D</string>
<string>6B2CDDC9119830560090FA4D</string>
<string>6B57E96B11A7695700614060</string>
<string>6B10000A11ACFFFB0098A59A</string>
<string>6B10003311AD03030098A59A</string>
<string>6B10011711AD19F90098A59A</string>
<string>6B10011811AD19F90098A59A</string>
<string>6B10011911AD19F90098A59A</string>
<string>6B10016C11AD1DE70098A59A</string>
<string>6B10017811AD1F0E0098A59A</string>
<string>6B10017911AD1F0E0098A59A</string>
<string>6B10017A11AD1F0E0098A59A</string>
<string>6B10018811AD204E0098A59A</string>
<string>6B1001A911AD23AA0098A59A</string>
<string>6B1001AA11AD23AA0098A59A</string>
<string>6BC7619A11B63C7E00FF5E51</string>
<string>6B586E8211CF3E0000704B61</string>
<string>6B586E8311CF3E0000704B61</string>
<string>6B77655411E3A9490029917E</string>
<string>6B77655511E3A9490029917E</string>
<string>6B77655811E3A9490029917E</string>
<string>6B98453411E6013000FA177B</string>
<string>6B98462E11E6141900FA177B</string>
<string>6B98464311E6F9B400FA177B</string>
<string>6B98464711E6F9B400FA177B</string>
<string>6B98464811E6F9B400FA177B</string>
<string>6B98468011E6FF2000FA177B</string>
<string>6B98468911E6FFC300FA177B</string>
<string>6B9846A011E7140300FA177B</string>
<string>6B9846A111E7140300FA177B</string>
<string>6B9846B911E7145500FA177B</string>
<string>6B9846C911E715C700FA177B</string>
<string>6B9846D511E716A200FA177B</string>
<string>6B9846DF11E7172B00FA177B</string>
<string>6B9846F111E7282C00FA177B</string>
<string>6B9846F211E7282C00FA177B</string>
<string>6B9846F311E7282C00FA177B</string>
<string>6B9846F411E7282C00FA177B</string>
<string>6B9846F511E7282C00FA177B</string>
<string>6B9846F611E7282C00FA177B</string>
<string>6B98470011E7285500FA177B</string>
<string>6B98470111E7285500FA177B</string>
</array>
<key>prevStack</key>
<array>
<string>6BBB4AD0115B4F3400CF791D</string>
<string>6BBB4AD2115B4F3400CF791D</string>
<string>6BBB4AD3115B4F3400CF791D</string>
<string>6BBB4AD4115B4F3400CF791D</string>
<string>6BBB4AD8115B4F3400CF791D</string>
<string>6BBB4ADF115B4F3400CF791D</string>
<string>6BBB4AE0115B4F3400CF791D</string>
<string>6BBB4AE1115B4F3400CF791D</string>
@ -436,27 +434,21 @@
<string>6BBB4AFA115B4F3400CF791D</string>
<string>6BBB4AFB115B4F3400CF791D</string>
<string>6BBB4AFD115B4F3400CF791D</string>
<string>6BBB4AFF115B4F3400CF791D</string>
<string>6BBB4B03115B4F3400CF791D</string>
<string>6BBB4B07115B4F3400CF791D</string>
<string>6BBB4B08115B4F3400CF791D</string>
<string>6BBB4B0A115B4F3400CF791D</string>
<string>6BBB4B0C115B4F3400CF791D</string>
<string>6BBB4B11115B4F3400CF791D</string>
<string>6BBB4B87115B639200CF791D</string>
<string>6BBB4C3B115B7A3D00CF791D</string>
<string>6BED8AF0117455CB00582F38</string>
<string>6BF5F27811747CFA000502A6</string>
<string>6BF5F28011747CFA000502A6</string>
<string>6BF5F28D11747CFA000502A6</string>
<string>6BF5F2ED11748884000502A6</string>
<string>6BF5F2EE11748884000502A6</string>
<string>6BF5F33911759C3C000502A6</string>
<string>6B4215CF118066FE006C347B</string>
<string>6B4215D1118066FE006C347B</string>
<string>6B4215DF1180672F006C347B</string>
<string>6B4216881180725E006C347B</string>
<string>6B4217131180803D006C347B</string>
<string>6B555F481191AA4400843384</string>
<string>6B55625E1193EF2F00843384</string>
<string>6B5562631193EF2F00843384</string>
@ -467,42 +459,177 @@
<string>6B2CDD71119810560090FA4D</string>
<string>6B2CDD98119818F90090FA4D</string>
<string>6B57E94D11A7646800614060</string>
<string>6B10FFC911ACF80A0098A59A</string>
<string>6B10FFD711ACF8990098A59A</string>
<string>6B10FFD811ACF8990098A59A</string>
<string>6B10FFD911ACF8990098A59A</string>
<string>6B10FFDA11ACF8990098A59A</string>
<string>6B10FFE411ACF95E0098A59A</string>
<string>6B10005B11AD08FA0098A59A</string>
<string>6B10005C11AD08FA0098A59A</string>
<string>6B10005D11AD08FA0098A59A</string>
<string>6B10006811AD09950098A59A</string>
<string>6B10011D11AD19F90098A59A</string>
<string>6B10011E11AD19F90098A59A</string>
<string>6B10011F11AD19F90098A59A</string>
<string>6B10012011AD19F90098A59A</string>
<string>6B10012111AD19F90098A59A</string>
<string>6B10012211AD19F90098A59A</string>
<string>6B10012311AD19F90098A59A</string>
<string>6B10012411AD19F90098A59A</string>
<string>6B10013011AD1A7B0098A59A</string>
<string>6B10014F11AD1C240098A59A</string>
<string>6B10015711AD1C530098A59A</string>
<string>6B10015811AD1C530098A59A</string>
<string>6B10015911AD1C530098A59A</string>
<string>6B10015A11AD1C530098A59A</string>
<string>6B10016011AD1C900098A59A</string>
<string>6B10016A11AD1D9C0098A59A</string>
<string>6B10016E11AD1DE70098A59A</string>
<string>6B10017211AD1E790098A59A</string>
<string>6B10017C11AD1F0E0098A59A</string>
<string>6B10017D11AD1F0E0098A59A</string>
<string>6B10017E11AD1F0E0098A59A</string>
<string>6B10018A11AD204E0098A59A</string>
<string>6B10019F11AD22CE0098A59A</string>
<string>6B1001A011AD22CE0098A59A</string>
<string>6B1001AB11AD23AA0098A59A</string>
<string>6B1001AC11AD23AA0098A59A</string>
<string>6BC7619C11B63C7E00FF5E51</string>
<string>6B98453E11E6013000FA177B</string>
<string>6B98453F11E6013000FA177B</string>
<string>6B98454311E6013000FA177B</string>
<string>6B98454511E6013000FA177B</string>
<string>6B98454611E6013000FA177B</string>
<string>6B98454711E6013000FA177B</string>
<string>6B98454811E6013000FA177B</string>
<string>6B98454911E6013000FA177B</string>
<string>6B98454B11E6013000FA177B</string>
<string>6B98454D11E6013000FA177B</string>
<string>6B98454F11E6013000FA177B</string>
<string>6B98455011E6013000FA177B</string>
<string>6B98455111E6013000FA177B</string>
<string>6B98455211E6013000FA177B</string>
<string>6B98455311E6013000FA177B</string>
<string>6B98455411E6013000FA177B</string>
<string>6B98455511E6013000FA177B</string>
<string>6B98455611E6013000FA177B</string>
<string>6B98455711E6013000FA177B</string>
<string>6B98455811E6013000FA177B</string>
<string>6B98455911E6013000FA177B</string>
<string>6B98455A11E6013000FA177B</string>
<string>6B98455B11E6013000FA177B</string>
<string>6B98455C11E6013000FA177B</string>
<string>6B98455D11E6013000FA177B</string>
<string>6B98455E11E6013000FA177B</string>
<string>6B98455F11E6013000FA177B</string>
<string>6B98456011E6013000FA177B</string>
<string>6B98456311E6013000FA177B</string>
<string>6B98456411E6013000FA177B</string>
<string>6B98456511E6013000FA177B</string>
<string>6B98456611E6013000FA177B</string>
<string>6B98456711E6013000FA177B</string>
<string>6B98456811E6013000FA177B</string>
<string>6B98456911E6013000FA177B</string>
<string>6B98456A11E6013000FA177B</string>
<string>6B98456B11E6013000FA177B</string>
<string>6B98456C11E6013000FA177B</string>
<string>6B98456E11E6013000FA177B</string>
<string>6B98457011E6013000FA177B</string>
<string>6B98457211E6013000FA177B</string>
<string>6B98457411E6013000FA177B</string>
<string>6B98458A11E6039A00FA177B</string>
<string>6B98458B11E6039A00FA177B</string>
<string>6B98458C11E6039A00FA177B</string>
<string>6B98458D11E6039A00FA177B</string>
<string>6B98458E11E6039A00FA177B</string>
<string>6B98458F11E6039A00FA177B</string>
<string>6B98459011E6039A00FA177B</string>
<string>6B98459111E6039A00FA177B</string>
<string>6B98459211E6039A00FA177B</string>
<string>6B98459311E6039A00FA177B</string>
<string>6B98459411E6039A00FA177B</string>
<string>6B98459511E6039A00FA177B</string>
<string>6B98459611E6039A00FA177B</string>
<string>6B98459711E6039A00FA177B</string>
<string>6B98459811E6039A00FA177B</string>
<string>6B98459911E6039A00FA177B</string>
<string>6B98459A11E6039A00FA177B</string>
<string>6B98459B11E6039A00FA177B</string>
<string>6B98459C11E6039A00FA177B</string>
<string>6B98459D11E6039A00FA177B</string>
<string>6B98459E11E6039A00FA177B</string>
<string>6B98459F11E6039A00FA177B</string>
<string>6B9845A011E6039A00FA177B</string>
<string>6B9845A111E6039A00FA177B</string>
<string>6B9845A211E6039A00FA177B</string>
<string>6B9845B911E609E600FA177B</string>
<string>6B9845BA11E609E600FA177B</string>
<string>6B9845BB11E609E600FA177B</string>
<string>6B9845BC11E609E600FA177B</string>
<string>6B9845BD11E609E600FA177B</string>
<string>6B9845D911E60DBB00FA177B</string>
<string>6B9845DA11E60DBB00FA177B</string>
<string>6B9845DB11E60DBB00FA177B</string>
<string>6B9845DC11E60DBB00FA177B</string>
<string>6B9845DD11E60DBB00FA177B</string>
<string>6B9845DE11E60DBB00FA177B</string>
<string>6B9845DF11E60DBB00FA177B</string>
<string>6B9845E011E60DBB00FA177B</string>
<string>6B9845E111E60DBB00FA177B</string>
<string>6B9845E211E60DBB00FA177B</string>
<string>6B9845E311E60DBB00FA177B</string>
<string>6B9845E411E60DBB00FA177B</string>
<string>6B9845E511E60DBB00FA177B</string>
<string>6B9845E611E60DBB00FA177B</string>
<string>6B9845E711E60DBB00FA177B</string>
<string>6B9845E811E60DBB00FA177B</string>
<string>6B9845E911E60DBB00FA177B</string>
<string>6B9845EA11E60DBB00FA177B</string>
<string>6B9845EB11E60DBB00FA177B</string>
<string>6B9845EC11E60DBB00FA177B</string>
<string>6B9845ED11E60DBB00FA177B</string>
<string>6B9845EE11E60DBB00FA177B</string>
<string>6B9845EF11E60DBB00FA177B</string>
<string>6B9845F711E60DDC00FA177B</string>
<string>6B98461711E60EE700FA177B</string>
<string>6B98461811E60EE700FA177B</string>
<string>6B98462611E612F100FA177B</string>
<string>6B98465011E6F9B400FA177B</string>
<string>6B98465111E6F9B400FA177B</string>
<string>6B98465211E6F9B400FA177B</string>
<string>6B98465311E6F9B400FA177B</string>
<string>6B98465411E6F9B400FA177B</string>
<string>6B98465511E6F9B400FA177B</string>
<string>6B98465611E6F9B400FA177B</string>
<string>6B98465711E6F9B400FA177B</string>
<string>6B98465811E6F9B400FA177B</string>
<string>6B98465911E6F9B400FA177B</string>
<string>6B98465A11E6F9B400FA177B</string>
<string>6B98465B11E6F9B400FA177B</string>
<string>6B98465C11E6F9B400FA177B</string>
<string>6B98465D11E6F9B400FA177B</string>
<string>6B98465E11E6F9B400FA177B</string>
<string>6B98465F11E6F9B400FA177B</string>
<string>6B98466011E6F9B400FA177B</string>
<string>6B98466111E6F9B400FA177B</string>
<string>6B98466211E6F9B400FA177B</string>
<string>6B98466311E6F9B400FA177B</string>
<string>6B98466411E6F9B400FA177B</string>
<string>6B98466511E6F9B400FA177B</string>
<string>6B98466611E6F9B400FA177B</string>
<string>6B98467211E6FC1C00FA177B</string>
<string>6B98467311E6FC1C00FA177B</string>
<string>6B98467411E6FC1C00FA177B</string>
<string>6B98467511E6FC1C00FA177B</string>
<string>6B98467611E6FC1C00FA177B</string>
<string>6B98467711E6FC1C00FA177B</string>
<string>6B98467B11E6FE7000FA177B</string>
<string>6B98468211E6FF2000FA177B</string>
<string>6B98468311E6FF2000FA177B</string>
<string>6B98468411E6FF2000FA177B</string>
<string>6B98468511E6FF2000FA177B</string>
<string>6B98468C11E6FFC300FA177B</string>
<string>6B98468D11E6FFC300FA177B</string>
<string>6B98468E11E6FFC300FA177B</string>
<string>6B98469311E7053800FA177B</string>
<string>6B9846A311E7140300FA177B</string>
<string>6B9846A411E7140300FA177B</string>
<string>6B9846A511E7140300FA177B</string>
<string>6B9846A811E7140300FA177B</string>
<string>6B9846AA11E7140300FA177B</string>
<string>6B9846B411E7140300FA177B</string>
<string>6B9846B511E7140300FA177B</string>
<string>6B9846BB11E7145500FA177B</string>
<string>6B9846CB11E715C700FA177B</string>
<string>6B9846CC11E715C700FA177B</string>
<string>6B9846CD11E715C700FA177B</string>
<string>6B9846CE11E715C700FA177B</string>
<string>6B9846CF11E715C700FA177B</string>
<string>6B9846D011E715C700FA177B</string>
<string>6B9846D111E715C700FA177B</string>
<string>6B9846D711E716A200FA177B</string>
<string>6B9846E411E7172B00FA177B</string>
<string>6B9846E511E7172B00FA177B</string>
<string>6B9846E611E7172B00FA177B</string>
<string>6B9846E711E7172B00FA177B</string>
<string>6B9846E811E7172B00FA177B</string>
<string>6B9846E911E7172B00FA177B</string>
<string>6B9846EA11E7172B00FA177B</string>
<string>6B9846F811E7282C00FA177B</string>
<string>6B9846F911E7282C00FA177B</string>
<string>6B9846FA11E7282C00FA177B</string>
<string>6B9846FB11E7282C00FA177B</string>
<string>6B9846FC11E7282C00FA177B</string>
<string>6B9846FD11E7282C00FA177B</string>
<string>6B98470211E7285500FA177B</string>
</array>
</dict>
<key>SplitCount</key>
@ -516,18 +643,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {970, 545}}</string>
<string>{{0, 0}, {887, 408}}</string>
<key>RubberWindowFrame</key>
<string>13 75 1256 702 0 0 1280 778 </string>
<string>33 87 1173 691 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>545pt</string>
<string>408pt</string>
</dict>
<dict>
<key>Proportion</key>
<string>111pt</string>
<string>237pt</string>
<key>Tabs</key>
<array>
<dict>
@ -541,7 +668,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {970, 68}}</string>
<string>{{10, 27}, {887, 102}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@ -557,7 +684,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {970, 52}}</string>
<string>{{10, 27}, {887, 210}}</string>
<key>RubberWindowFrame</key>
<string>33 87 1173 691 0 0 1280 778 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
@ -595,9 +724,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {970, 84}}</string>
<key>RubberWindowFrame</key>
<string>13 75 1256 702 0 0 1280 778 </string>
<string>{{10, 27}, {887, 83}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@ -606,7 +733,7 @@
</dict>
</array>
<key>Proportion</key>
<string>970pt</string>
<string>887pt</string>
</dict>
</array>
<key>Name</key>
@ -625,11 +752,11 @@
</array>
<key>TableOfContents</key>
<array>
<string>6B10FFC111ACF6790098A59A</string>
<string>6B98451A11E5E81100FA177B</string>
<string>1CA23ED40692098700951B8B</string>
<string>6B10FFC211ACF6790098A59A</string>
<string>6B98451B11E5E81100FA177B</string>
<string>6B8632A30F78115100E2684A</string>
<string>6B10FFC311ACF6790098A59A</string>
<string>6B98451C11E5E81100FA177B</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@ -680,12 +807,12 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1256, 73}}</string>
<string>{{0, 0}, {1173, 157}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>73pt</string>
<string>157pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
@ -704,8 +831,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {575, 85}}</string>
<string>{{575, 0}, {681, 85}}</string>
<string>{{0, 0}, {537, 135}}</string>
<string>{{537, 0}, {636, 135}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
@ -720,8 +847,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1256, 85}}</string>
<string>{{0, 85}, {1256, 498}}</string>
<string>{{0, 0}, {1173, 135}}</string>
<string>{{0, 135}, {1173, 360}}</string>
</array>
</dict>
</dict>
@ -741,7 +868,7 @@
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 78}, {1256, 583}}</string>
<string>{{0, 162}, {1173, 495}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
@ -751,16 +878,16 @@
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>388</real>
<real>343</real>
</array>
<key>Frame</key>
<string>{{575, 0}, {681, 85}}</string>
<string>{{537, 0}, {636, 135}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>583pt</string>
<string>495pt</string>
</dict>
</array>
<key>Name</key>
@ -778,14 +905,14 @@
</array>
<key>TableOfContents</key>
<array>
<string>6B10FFCC11ACF80A0098A59A</string>
<string>6B98457611E6013000FA177B</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
<string>6B10FFCD11ACF80A0098A59A</string>
<string>6B10FFCE11ACF80A0098A59A</string>
<string>6B10FFCF11ACF80A0098A59A</string>
<string>6B10FFD011ACF80A0098A59A</string>
<string>6B10FFD111ACF80A0098A59A</string>
<string>6B98457711E6013000FA177B</string>
<string>6B98457811E6013000FA177B</string>
<string>6B98457911E6013000FA177B</string>
<string>6B98457A11E6013000FA177B</string>
<string>6B98457B11E6013000FA177B</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
@ -817,12 +944,12 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>6B10001111ACFFFB0098A59A</string>
<string>6B10001211ACFFFB0098A59A</string>
<string>6B9845FA11E60DDC00FA177B</string>
<string>6B9845FB11E60DDC00FA177B</string>
<string>/Users/memon/Code/recastnavigation/RecastDemo/Build/Xcode/Recast.xcodeproj</string>
</array>
<key>WindowString</key>
<string>13 75 1256 702 0 0 1280 778 </string>
<string>33 87 1173 691 0 0 1280 778 </string>
<key>WindowToolsV3</key>
<array>
<dict>

View File

@ -33,8 +33,9 @@
6B8632DC0F78123E00E2684A /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B8632DB0F78123E00E2684A /* OpenGL.framework */; };
6B8DE88910B69E3E00DF20FB /* DetourNavMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */; };
6B8DE88A10B69E3E00DF20FB /* DetourNavMeshBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */; };
6B98463311E6144400FA177B /* Sample_SoloMeshTiled.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B98463211E6144400FA177B /* Sample_SoloMeshTiled.cpp */; };
6B9846EF11E718F800FA177B /* DetourAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B9846EE11E718F800FA177B /* DetourAlloc.cpp */; };
6BA1E88B10C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */; };
6BA1E88C10C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */; };
6BB788170FC0472B003C24DB /* ChunkyTriMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB788160FC0472B003C24DB /* ChunkyTriMesh.cpp */; };
6BB7FC0B10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB7FC0A10EBB6AA006DA0A6 /* NavMeshTesterTool.cpp */; };
6BB7FDA510F36F0E006DA0A6 /* InputGeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6BB7FDA410F36F0E006DA0A6 /* InputGeom.cpp */; };
@ -100,10 +101,12 @@
6B8DE88810B69E3E00DF20FB /* DetourNavMeshBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DetourNavMeshBuilder.cpp; path = ../../../Detour/Source/DetourNavMeshBuilder.cpp; sourceTree = SOURCE_ROOT; };
6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DetourNavMesh.h; path = ../../../Detour/Include/DetourNavMesh.h; sourceTree = SOURCE_ROOT; };
6B8DE88C10B69E4C00DF20FB /* DetourNavMeshBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DetourNavMeshBuilder.h; path = ../../../Detour/Include/DetourNavMeshBuilder.h; sourceTree = SOURCE_ROOT; };
6B98463111E6144400FA177B /* Sample_SoloMeshTiled.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sample_SoloMeshTiled.h; path = ../../Include/Sample_SoloMeshTiled.h; sourceTree = SOURCE_ROOT; };
6B98463211E6144400FA177B /* Sample_SoloMeshTiled.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sample_SoloMeshTiled.cpp; path = ../../Source/Sample_SoloMeshTiled.cpp; sourceTree = SOURCE_ROOT; };
6B9846ED11E718F800FA177B /* DetourAlloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DetourAlloc.h; path = ../../../Detour/Include/DetourAlloc.h; sourceTree = SOURCE_ROOT; };
6B9846EE11E718F800FA177B /* DetourAlloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DetourAlloc.cpp; path = ../../../Detour/Source/DetourAlloc.cpp; sourceTree = SOURCE_ROOT; };
6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sample_SoloMeshSimple.cpp; path = ../../Source/Sample_SoloMeshSimple.cpp; sourceTree = SOURCE_ROOT; };
6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sample_SoloMeshTiled.cpp; path = ../../Source/Sample_SoloMeshTiled.cpp; sourceTree = SOURCE_ROOT; };
6BA1E88E10C7BFD3008007F6 /* Sample_SoloMeshSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sample_SoloMeshSimple.h; path = ../../Include/Sample_SoloMeshSimple.h; sourceTree = SOURCE_ROOT; };
6BA1E88F10C7BFD3008007F6 /* Sample_SoloMeshTiled.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sample_SoloMeshTiled.h; path = ../../Include/Sample_SoloMeshTiled.h; sourceTree = SOURCE_ROOT; };
6BB788160FC0472B003C24DB /* ChunkyTriMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChunkyTriMesh.cpp; path = ../../Source/ChunkyTriMesh.cpp; sourceTree = SOURCE_ROOT; };
6BB788180FC04753003C24DB /* ChunkyTriMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChunkyTriMesh.h; path = ../../Include/ChunkyTriMesh.h; sourceTree = SOURCE_ROOT; };
6BB7FC0910EBB6AA006DA0A6 /* NavMeshTesterTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NavMeshTesterTool.h; path = ../../Include/NavMeshTesterTool.h; sourceTree = SOURCE_ROOT; };
@ -274,8 +277,8 @@
6B25B6140FFA62BE004F1BC4 /* Sample.cpp */,
6BA1E88E10C7BFD3008007F6 /* Sample_SoloMeshSimple.h */,
6BA1E88810C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp */,
6BA1E88F10C7BFD3008007F6 /* Sample_SoloMeshTiled.h */,
6BA1E88910C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp */,
6B98463111E6144400FA177B /* Sample_SoloMeshTiled.h */,
6B98463211E6144400FA177B /* Sample_SoloMeshTiled.cpp */,
6B2AEC510FFB8946005BE9CC /* Sample_TileMesh.h */,
6B2AEC520FFB8958005BE9CC /* Sample_TileMesh.cpp */,
6B8036AC113BAABE005ED67B /* Sample_Debug.h */,
@ -315,6 +318,8 @@
6BDD9E030F91110C00904EEF /* Detour */ = {
isa = PBXGroup;
children = (
6B9846ED11E718F800FA177B /* DetourAlloc.h */,
6B9846EE11E718F800FA177B /* DetourAlloc.cpp */,
6B8DE88B10B69E4C00DF20FB /* DetourNavMesh.h */,
6B8DE88710B69E3E00DF20FB /* DetourNavMesh.cpp */,
6B8DE88C10B69E4C00DF20FB /* DetourNavMeshBuilder.h */,
@ -405,7 +410,6 @@
6B8DE88910B69E3E00DF20FB /* DetourNavMesh.cpp in Sources */,
6B8DE88A10B69E3E00DF20FB /* DetourNavMeshBuilder.cpp in Sources */,
6BA1E88B10C7BFC9008007F6 /* Sample_SoloMeshSimple.cpp in Sources */,
6BA1E88C10C7BFC9008007F6 /* Sample_SoloMeshTiled.cpp in Sources */,
6BB93C7D10CFE1D500F74F2B /* DebugDraw.cpp in Sources */,
6BB93C7E10CFE1D500F74F2B /* DetourDebugDraw.cpp in Sources */,
6BB93C7F10CFE1D500F74F2B /* RecastDebugDraw.cpp in Sources */,
@ -419,6 +423,8 @@
6B8036AE113BAABE005ED67B /* Sample_Debug.cpp in Sources */,
6BF5F23A11747606000502A6 /* Filelist.cpp in Sources */,
6BF5F2401174763B000502A6 /* SlideShow.cpp in Sources */,
6B98463311E6144400FA177B /* Sample_SoloMeshTiled.cpp in Sources */,
6B9846EF11E718F800FA177B /* DetourAlloc.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -24,7 +24,7 @@
#include "Recast.h"
#include "RecastLog.h"
class Sample_SoloMeshSimple : public Sample //Sample_SoloMesh
class Sample_SoloMeshSimple : public Sample
{
protected:
bool m_keepInterResults;

View File

@ -75,7 +75,8 @@ void Sample_SoloMeshSimple::cleanup()
m_pmesh = 0;
delete m_dmesh;
m_dmesh = 0;
delete m_navMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = 0;
}
@ -318,7 +319,7 @@ void Sample_SoloMeshSimple::handleMeshChanged(class InputGeom* geom)
{
Sample::handleMeshChanged(geom);
delete m_navMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = 0;
if (m_tool)
@ -634,10 +635,10 @@ bool Sample_SoloMeshSimple::handleBuild()
return false;
}
m_navMesh = new dtNavMesh;
m_navMesh = dtAllocNavMesh();
if (!m_navMesh)
{
delete [] navData;
dtFree(navData);
if (rcGetLog())
rcGetLog()->log(RC_LOG_ERROR, "Could not create Detour navmesh");
return false;
@ -645,7 +646,7 @@ bool Sample_SoloMeshSimple::handleBuild()
if (!m_navMesh->init(navData, navDataSize, DT_TILE_FREE_DATA, 2048))
{
delete [] navData;
dtFree(navData);
if (rcGetLog())
rcGetLog()->log(RC_LOG_ERROR, "Could not init Detour navmesh");
return false;

View File

@ -157,7 +157,7 @@ void Sample_SoloMeshTiled::cleanup()
m_pmesh = 0;
delete m_dmesh;
m_dmesh = 0;
delete m_navMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = 0;
m_statTimePerTileSamples = 0;
m_statPolysPerTileSamples = 0;
@ -656,7 +656,7 @@ void Sample_SoloMeshTiled::handleMeshChanged(class InputGeom* geom)
{
Sample::handleMeshChanged(geom);
delete m_navMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = 0;
m_statTimePerTileSamples = 0;
@ -1093,10 +1093,10 @@ bool Sample_SoloMeshTiled::handleBuild()
return false;
}
m_navMesh = new dtNavMesh;
m_navMesh = dtAllocNavMesh();
if (!m_navMesh)
{
delete [] navData;
dtFree(navData);
if (rcGetLog())
rcGetLog()->log(RC_LOG_ERROR, "Could not create Detour navmesh");
return false;
@ -1104,7 +1104,7 @@ bool Sample_SoloMeshTiled::handleBuild()
if (!m_navMesh->init(navData, navDataSize, DT_TILE_FREE_DATA, 2048))
{
delete [] navData;
dtFree(navData);
if (rcGetLog())
rcGetLog()->log(RC_LOG_ERROR, "Could not init Detour navmesh");
return false;

View File

@ -194,7 +194,7 @@ Sample_TileMesh::Sample_TileMesh() :
Sample_TileMesh::~Sample_TileMesh()
{
cleanup();
delete m_navMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = 0;
}
@ -290,7 +290,8 @@ dtNavMesh* Sample_TileMesh::loadAll(const char* path)
return 0;
}
dtNavMesh* mesh = new dtNavMesh;
dtNavMesh* mesh = dtAllocNavMesh();
if (!mesh || !mesh->init(&header.params))
{
fclose(fp);
@ -305,7 +306,7 @@ dtNavMesh* Sample_TileMesh::loadAll(const char* path)
if (!tileHeader.tileRef || !tileHeader.dataSize)
break;
unsigned char* data = new unsigned char[tileHeader.dataSize];
unsigned char* data = (unsigned char*)dtAlloc(tileHeader.dataSize, DT_ALLOC_PERM);
if (!data) break;
memset(data, 0, tileHeader.dataSize);
fread(data, tileHeader.dataSize, 1, fp);
@ -371,7 +372,7 @@ void Sample_TileMesh::handleSettings()
if (imguiButton("Load"))
{
delete m_navMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = loadAll("all_tiles_navmesh.bin");
}
@ -501,7 +502,7 @@ void Sample_TileMesh::handleMeshChanged(class InputGeom* geom)
cleanup();
delete m_navMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = 0;
if (m_tool)
@ -520,8 +521,9 @@ bool Sample_TileMesh::handleBuild()
return false;
}
delete m_navMesh;
m_navMesh = new dtNavMesh;
dtFreeNavMesh(m_navMesh);
m_navMesh = dtAllocNavMesh();
if (!m_navMesh)
{
if (rcGetLog())
@ -584,7 +586,7 @@ void Sample_TileMesh::buildTile(const float* pos)
// Let the navmesh own the data.
if (!m_navMesh->addTile(data,dataSize,DT_TILE_FREE_DATA))
delete [] data;
dtFree(data);
}
}
@ -664,7 +666,7 @@ void Sample_TileMesh::buildAllTiles()
m_navMesh->removeTile(m_navMesh->getTileRefAt(x,y),0,0);
// Let the navmesh own the data.
if (!m_navMesh->addTile(data,dataSize,true))
delete [] data;
dtFree(data);
}
}
}