diff --git a/RecastDemo/Include/Sample.h b/RecastDemo/Include/Sample.h index 847d3e66..fedddc14 100644 --- a/RecastDemo/Include/Sample.h +++ b/RecastDemo/Include/Sample.h @@ -110,9 +110,9 @@ class Sample public: InputGeom* inputGeometry = nullptr; dtNavMesh* navMesh = nullptr; + dtNavMeshQuery* navQuery = nullptr; protected: - dtNavMeshQuery* navQuery = nullptr; dtCrowd* crowd = nullptr; unsigned char navMeshDrawFlags; @@ -175,7 +175,6 @@ public: virtual void handleUpdate(float dt); virtual void collectSettings(struct BuildSettings& settings); - dtNavMeshQuery* getNavMeshQuery() { return navQuery; } dtCrowd* getCrowd() { return crowd; } float getAgentRadius() { return agentRadius; } float getAgentHeight() { return agentHeight; } diff --git a/RecastDemo/Source/CrowdTool.cpp b/RecastDemo/Source/CrowdTool.cpp index dbe09b28..ae1686cf 100644 --- a/RecastDemo/Source/CrowdTool.cpp +++ b/RecastDemo/Source/CrowdTool.cpp @@ -848,7 +848,7 @@ void CrowdToolState::setMoveTarget(const float* p, bool adjust) } // Find nearest point on navmesh and set move request to that location. - dtNavMeshQuery* navquery = sample->getNavMeshQuery(); + dtNavMeshQuery* navquery = sample->navQuery; dtCrowd* crowd = sample->getCrowd(); const dtQueryFilter* filter = crowd->getFilter(0); const float* halfExtents = crowd->getQueryExtents(); @@ -1181,7 +1181,7 @@ void CrowdTool::handleClick(const float* s, const float* p, bool shift) else if (mode == ToolMode::TOGGLE_POLYS) { dtNavMesh* nav = sample->navMesh; - dtNavMeshQuery* navquery = sample->getNavMeshQuery(); + dtNavMeshQuery* navquery = sample->navQuery; if (nav && navquery) { dtQueryFilter filter; diff --git a/RecastDemo/Source/NavMeshPruneTool.cpp b/RecastDemo/Source/NavMeshPruneTool.cpp index a7049a43..bfa52009 100644 --- a/RecastDemo/Source/NavMeshPruneTool.cpp +++ b/RecastDemo/Source/NavMeshPruneTool.cpp @@ -260,7 +260,7 @@ void NavMeshPruneTool::handleClick(const float* s, const float* p, bool shift) { return; } - dtNavMeshQuery* query = sample->getNavMeshQuery(); + dtNavMeshQuery* query = sample->navQuery; if (!query) { return; diff --git a/RecastDemo/Source/NavMeshTesterTool.cpp b/RecastDemo/Source/NavMeshTesterTool.cpp index 3285c178..899a0d60 100644 --- a/RecastDemo/Source/NavMeshTesterTool.cpp +++ b/RecastDemo/Source/NavMeshTesterTool.cpp @@ -196,7 +196,7 @@ void NavMeshTesterTool::init(Sample* sample) { m_sample = sample; m_navMesh = sample->navMesh; - m_navQuery = sample->getNavMeshQuery(); + m_navQuery = sample->navQuery; recalc(); if (m_navQuery)