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