| 209 | } |
| 210 | |
| 211 | void Scene::LoadModels( |
| 212 | const Json::Value& modelList, |
| 213 | const std::filesystem::path& scenePath, |
| 214 | ThreadPool* threadPool) |
| 215 | { |
| 216 | if (!modelList.isArray()) |
| 217 | { |
| 218 | return; |
| 219 | } |
| 220 | |
| 221 | m_Models.resize(modelList.size()); |
| 222 | uint32_t index = 0; |
| 223 | for (const auto& model : modelList) |
| 224 | { |
| 225 | ++g_LoadingStats.ObjectsTotal; |
| 226 | |
| 227 | std::filesystem::path fileName = scenePath / std::filesystem::path(model.asString()); |
| 228 | |
| 229 | LoadModelAsync(index, fileName, threadPool); |
| 230 | |
| 231 | ++index; |
| 232 | } |
| 233 | |
| 234 | if (threadPool) |
| 235 | threadPool->WaitForTasks(); |
| 236 | } |
| 237 | |
| 238 | void Scene::LoadSceneGraph(const Json::Value& nodeList, const std::shared_ptr<SceneGraphNode>& parent) |
| 239 | { |
nothing calls this directly
no test coverage detected