MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / buildTiles

Method buildTiles

Engine/source/navigation/navMesh.cpp:1098–1116  ·  view source on GitHub ↗

This method should never be called in a separate thread to the rendering or pathfinding logic. It directly replaces data in the dtNavMesh for this NavMesh object.

Source from the content-addressed store, hash-verified

1096/// or pathfinding logic. It directly replaces data in the dtNavMesh for
1097/// this NavMesh object.
1098void NavMesh::buildTiles(const Box3F &box)
1099{
1100 PROFILE_SCOPE(NavMesh_buildTiles);
1101 // Make sure we've already built or loaded.
1102 if(!nm)
1103 return;
1104 // Iterate over tiles.
1105 for(U32 i = 0; i < mTiles.size(); i++)
1106 {
1107 const Tile &tile = mTiles[i];
1108 // Check tile box.
1109 if(!tile.box.isOverlapped(box))
1110 continue;
1111 // Mark as dirty.
1112 mDirtyTiles.push_back_unique(i);
1113 }
1114 if(mDirtyTiles.size())
1115 ctx->startTimer(RC_TIMER_TOTAL);
1116}
1117
1118DefineEngineMethod(NavMesh, buildTiles, void, (Box3F box),,
1119 "@brief Rebuild the tiles overlapped by the input box.")

Callers 1

navMesh.cppFile · 0.80

Calls 4

push_back_uniqueMethod · 0.80
isOverlappedMethod · 0.60
sizeMethod · 0.45
startTimerMethod · 0.45

Tested by

no test coverage detected