From dbb899175f2c38f53915c4eb801163481c628f5f Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Fri, 5 Sep 2025 11:54:19 -0400 Subject: [PATCH] Neighbour -> Neighbor in cases that don't break APIs --- RecastDemo/Include/Tool_NavMeshTester.h | 4 ++-- RecastDemo/Source/Sample_TileMesh.cpp | 4 ++-- RecastDemo/Source/Tool_Crowd.cpp | 2 +- RecastDemo/Source/Tool_NavMeshPrune.cpp | 2 +- RecastDemo/Source/Tool_NavMeshTester.cpp | 20 ++++++++++---------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/RecastDemo/Include/Tool_NavMeshTester.h b/RecastDemo/Include/Tool_NavMeshTester.h index 65dc3842..cc99b358 100644 --- a/RecastDemo/Include/Tool_NavMeshTester.h +++ b/RecastDemo/Include/Tool_NavMeshTester.h @@ -42,7 +42,7 @@ class NavMeshTesterTool : public SampleTool DISTANCE_TO_WALL, FIND_POLYS_IN_CIRCLE, FIND_POLYS_IN_SHAPE, - FIND_LOCAL_NEIGHBOURHOOD + FIND_LOCAL_NEIGHBORHOOD }; ToolMode toolMode = ToolMode::PATHFIND_FOLLOW; @@ -76,7 +76,7 @@ class NavMeshTesterTool : public SampleTool float hitNormal[3]; bool hitResult = false; float distanceToWall = 0; - float neighbourhoodRadius = 2.5f; + float neighborhoodRadius = 2.5f; float randomRadius = 5.0f; int pathIterNum = 0; diff --git a/RecastDemo/Source/Sample_TileMesh.cpp b/RecastDemo/Source/Sample_TileMesh.cpp index b97ddedd..1a4b35e9 100644 --- a/RecastDemo/Source/Sample_TileMesh.cpp +++ b/RecastDemo/Source/Sample_TileMesh.cpp @@ -869,8 +869,8 @@ unsigned char* Sample_TileMesh::buildTileMesh( // You should use this bounding box to query your input geometry. // // For example if you build a navmesh for terrain, and want the navmesh tiles to match the terrain tile size - // you will need to pass in data from neighbour terrain tiles too! In a simple case, just pass in all the 8 neighbours, - // or use the bounding box below to only pass in a sliver of each of the 8 neighbours. + // you will need to pass in data from neighbor terrain tiles too! In a simple case, just pass in all the 8 neighbors, + // or use the bounding box below to only pass in a sliver of each of the 8 neighbors. rcVcopy(config.bmin, boundsMin); rcVcopy(config.bmax, boundsMax); config.bmin[0] -= static_cast(config.borderSize) * config.cs; diff --git a/RecastDemo/Source/Tool_Crowd.cpp b/RecastDemo/Source/Tool_Crowd.cpp index 5f6d80c1..91913df9 100644 --- a/RecastDemo/Source/Tool_Crowd.cpp +++ b/RecastDemo/Source/Tool_Crowd.cpp @@ -1056,7 +1056,7 @@ void CrowdTool::drawMenuUI() ImGui::Checkbox("Show Path", ¶ms->showPath); ImGui::Checkbox("Show VO", ¶ms->showVO); ImGui::Checkbox("Show Path Optimization", ¶ms->showOpt); - ImGui::Checkbox("Show Neighbours", ¶ms->showNeighbors); + ImGui::Checkbox("Show Neighbors", ¶ms->showNeighbors); ImGui::TreePop(); } diff --git a/RecastDemo/Source/Tool_NavMeshPrune.cpp b/RecastDemo/Source/Tool_NavMeshPrune.cpp index 6a599606..84ebc6c5 100644 --- a/RecastDemo/Source/Tool_NavMeshPrune.cpp +++ b/RecastDemo/Source/Tool_NavMeshPrune.cpp @@ -63,7 +63,7 @@ void floodNavmesh(const dtNavMesh* navmesh, NavmeshFlags* flags, const dtPolyRef // Mark as visited flags->setFlags(neiRef, flag); - // Visit neighbours + // Visit neighbors openList.push_back(neiRef); } } diff --git a/RecastDemo/Source/Tool_NavMeshTester.cpp b/RecastDemo/Source/Tool_NavMeshTester.cpp index c40af77d..06b8c362 100644 --- a/RecastDemo/Source/Tool_NavMeshTester.cpp +++ b/RecastDemo/Source/Tool_NavMeshTester.cpp @@ -80,7 +80,7 @@ int fixupShortcuts(dtPolyRef* path, int npath, dtNavMeshQuery* navQuery) } } - // If any of the neighbour polygons is within the next few polygons + // If any of the neighbor polygons is within the next few polygons // in the path, short cut to that polygon directly. static const int maxLookAhead = 6; int cut = 0; @@ -215,7 +215,7 @@ void NavMeshTesterTool::init(Sample* newSample) filter.setAreaCost(SAMPLE_POLYAREA_JUMP, 1.5f); } - neighbourhoodRadius = sample->agentRadius * 20.0f; + neighborhoodRadius = sample->agentRadius * 20.0f; randomRadius = sample->agentRadius * 30.0f; } @@ -289,9 +289,9 @@ void NavMeshTesterTool::drawMenuUI() ImGui::Separator(); - if (ImGui::RadioButton("Find Local Neighbourhood", toolMode == ToolMode::FIND_LOCAL_NEIGHBOURHOOD)) + if (ImGui::RadioButton("Find Local Neighborhood", toolMode == ToolMode::FIND_LOCAL_NEIGHBORHOOD)) { - toolMode = ToolMode::FIND_LOCAL_NEIGHBOURHOOD; + toolMode = ToolMode::FIND_LOCAL_NEIGHBORHOOD; recalc(); } @@ -1063,7 +1063,7 @@ void NavMeshTesterTool::recalc() sample->navQuery->findPolysAroundShape(startRef, queryPoly, 4, &filter, polys, parent, 0, &npolys, MAX_POLYS); } } - else if (toolMode == ToolMode::FIND_LOCAL_NEIGHBOURHOOD) + else if (toolMode == ToolMode::FIND_LOCAL_NEIGHBORHOOD) { if (sposSet && startRef) { @@ -1072,12 +1072,12 @@ void NavMeshTesterTool::recalc() spos[0], spos[1], spos[2], - neighbourhoodRadius, + neighborhoodRadius, filter.getIncludeFlags(), filter.getExcludeFlags()); #endif sample->navQuery->findLocalNeighbourhood( - startRef, spos, neighbourhoodRadius, &filter, polys, parent, &npolys, MAX_POLYS); + startRef, spos, neighborhoodRadius, &filter, polys, parent, &npolys, MAX_POLYS); } } } @@ -1370,7 +1370,7 @@ void NavMeshTesterTool::render() } } break; - case ToolMode::FIND_LOCAL_NEIGHBOURHOOD: + case ToolMode::FIND_LOCAL_NEIGHBORHOOD: { for (int i = 0; i < npolys; ++i) { @@ -1400,7 +1400,7 @@ void NavMeshTesterTool::render() // Skip too distant segments. float tseg; float distSqr = dtDistancePtSegSqr2D(spos, s, s + 3, tseg); - if (distSqr > dtSqr(neighbourhoodRadius)) + if (distSqr > dtSqr(neighborhoodRadius)) { continue; } @@ -1452,7 +1452,7 @@ void NavMeshTesterTool::render() spos[0], spos[1] + agentHeight / 2, spos[2], - neighbourhoodRadius, + neighborhoodRadius, duRGBA(64, 16, 0, 220), 2.0f); dd.depthMask(true);