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.
| 1096 | /// or pathfinding logic. It directly replaces data in the dtNavMesh for |
| 1097 | /// this NavMesh object. |
| 1098 | void 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 | |
| 1118 | DefineEngineMethod(NavMesh, buildTiles, void, (Box3F box),, |
| 1119 | "@brief Rebuild the tiles overlapped by the input box.") |
no test coverage detected