MCPcopy Create free account
hub / github.com/axmolengine/axmol / init

Method init

3rdparty/recast/DetourPathQueue.cpp:53–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53bool dtPathQueue::init(const int maxPathSize, const int maxSearchNodeCount, dtNavMesh* nav)
54{
55 purge();
56
57 m_navquery = dtAllocNavMeshQuery();
58 if (!m_navquery)
59 return false;
60 if (dtStatusFailed(m_navquery->init(nav, maxSearchNodeCount)))
61 return false;
62
63 m_maxPathSize = maxPathSize;
64 for (int i = 0; i < MAX_QUEUE; ++i)
65 {
66 m_queue[i].ref = DT_PATHQ_INVALID;
67 m_queue[i].path = (dtPolyRef*)dtAlloc(sizeof(dtPolyRef)*m_maxPathSize, DT_ALLOC_PERM);
68 if (!m_queue[i].path)
69 return false;
70 }
71
72 m_queueHead = 0;
73
74 return true;
75}
76
77void dtPathQueue::update(const int maxIters)
78{

Callers

nothing calls this directly

Calls 4

purgeFunction · 0.85
dtAllocNavMeshQueryFunction · 0.85
dtStatusFailedFunction · 0.85
dtAllocFunction · 0.85

Tested by

no test coverage detected