TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ Load()

void MeshGeneratorManager::Load ( nlohmann::json  data)

Definition at line 481 of file MeshGeneratorManager.cpp.

482{
483 while (*isRemeshing);
484
485 clearMeshGen->Load(data["cmg"]);
486
487 for (int i = 0; i < cpuNoiseLayers.size(); i++)
488 {
489 delete cpuNoiseLayers[i];
490 }
491
492 cpuNoiseLayers.clear();
493
494 for (int i = 0; i < data["cpunl"].size(); i++)
495 {
496 cpuNoiseLayers.push_back(new CPUNoiseLayersGenerator(appState));
497 cpuNoiseLayers.back()->Load(data["cpunl"][i]);
498 }
499
500 for (int i = 0; i < gpuNoiseLayers.size(); i++)
501 {
502 delete gpuNoiseLayers[i];
503 }
504
505 gpuNoiseLayers.clear();
506
507 for (int i = 0; i < data["gpunl"].size(); i++)
508 {
509 gpuNoiseLayers.push_back(new GPUNoiseLayerGenerator(appState, kernels));
510 gpuNoiseLayers.back()->Load(data["gpunl"][i]);
511 }
512
513 for (int i = 0; i < cpuNodeEditors.size(); i++)
514 {
515 delete cpuNodeEditors[i];
516 }
517
518 cpuNodeEditors.clear();
519
520 for (int i = 0; i < data["cpune"].size(); i++)
521 {
522 cpuNodeEditors.push_back(new CPUNodeEditor(appState));
523 cpuNodeEditors.back()->Load(data["cpune"][i]);
524 }
525}
size_type size() const noexcept
returns the number of elements
Definition: json.hpp:22912