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

Method buildTiles

Engine/source/navigation/navMesh.cpp:1100–1117  ·  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

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