| 39 | } |
| 40 | |
| 41 | void GltfModifier::trigger() { |
| 42 | if (!this->_currentVersion) { |
| 43 | this->_currentVersion = 0; |
| 44 | } else { |
| 45 | ++(*this->_currentVersion); |
| 46 | } |
| 47 | |
| 48 | if (!this->isRegistered()) { |
| 49 | return; |
| 50 | } |
| 51 | |
| 52 | // Add all already-loaded tiles to this requester's worker thread load queue. |
| 53 | // Tiles that are in ContentLoading will be added to this queue when they |
| 54 | // finish. |
| 55 | LoadedConstTileEnumerator enumerator(this->_pRootTile); |
| 56 | for (const Tile& tile : enumerator) { |
| 57 | if (this->needsWorkerThreadModification(tile)) { |
| 58 | this->_workerThreadQueue.emplace_back(&tile); |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | bool GltfModifier::needsWorkerThreadModification(const Tile& tile) const { |
| 64 | std::optional<int64_t> modelVersion = this->getCurrentVersion(); |
no test coverage detected