TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ ShowSettings()

void MeshGeneratorManager::ShowSettings ( )

Definition at line 117 of file MeshGeneratorManager.cpp.

118{
119 if (windowStat)
120 {
121 ImGui::Begin("Mesh Generators", &windowStat);
122 ImGui::PushFont(GetUIFont("OpenSans-Semi-Bold"));
123 ImGui::Text("Base Mesh Generators");
124 ImGui::PopFont();
125
126 if (ImGui::CollapsingHeader("Auto Base Mesh Gen (GPU)", clearMeshGen->uiActive))
127 {
128 clearMeshGen->ShowSettings();
129 }
130
131 ImGui::Separator();
132 ImGui::PushFont(GetUIFont("OpenSans-Semi-Bold"));
133 ImGui::Text("CPU Noise Layer Generators");
134 ImGui::PopFont();
135
136 for (int i = 0; i < cpuNoiseLayers.size(); i++)
137 {
138 if (ImGui::CollapsingHeader((cpuNoiseLayers[i]->name + "##CPUNL" + std::to_string(i)).c_str()))
139 {
140 cpuNoiseLayers[i]->ShowSetting(i);
141
142 if (ImGui::Button(("Delete##CPUNOUSELAYER" + std::to_string(i)).c_str()))
143 {
144 while (*isRemeshing);
145
146 cpuNoiseLayers.erase(cpuNoiseLayers.begin() + i);
147 break;
148 }
149 }
150
151 ImGui::Separator();
152 }
153
154 if (ImGui::Button("Add##CPULAYER"))
155 {
156 while (*isRemeshing);
157
158 cpuNoiseLayers.push_back(new CPUNoiseLayersGenerator(appState));
159 }
160
161 ImGui::Separator();
162 ImGui::PushFont(GetUIFont("OpenSans-Semi-Bold"));
163 ImGui::Text("GPU Noise Layer Generators");
164 ImGui::PopFont();
165
166 for (int i = 0; i < gpuNoiseLayers.size(); i++)
167 {
168 if (ImGui::CollapsingHeader((gpuNoiseLayers[i]->name + "##GPUNL" + std::to_string(i)).c_str()))
169 {
170 gpuNoiseLayers[i]->ShowSetting(i);
171
172 if (ImGui::Button(("Delete##GPUNOUSELAYER" + std::to_string(i)).c_str()))
173 {
174 while (*isRemeshing);
175
176 gpuNoiseLayers.erase(gpuNoiseLayers.begin() + i);
177 break;
178 }
179 }
180
181 ImGui::Separator();
182 }
183
184 if (ImGui::Button("Add##GPUNL"))
185 {
186 while (*isRemeshing);
187
188 gpuNoiseLayers.push_back(new GPUNoiseLayerGenerator(appState, kernels));
189 }
190
191 ImGui::Separator();
192 ImGui::PushFont(GetUIFont("OpenSans-Semi-Bold"));
193 ImGui::Text("CPU Node Editor Generators");
194 ImGui::PopFont();
195
196 for (int i = 0; i < cpuNodeEditors.size(); i++)
197 {
198 if (ImGui::CollapsingHeader((cpuNodeEditors[i]->name + "##CPUNE" + std::to_string(i)).c_str()))
199 {
200 cpuNodeEditors[i]->ShowSetting(i);
201
202 if (ImGui::Button(("Delete##CPNE" + std::to_string(i)).c_str()))
203 {
204 while (*isRemeshing);
205
206 cpuNodeEditors.erase(cpuNodeEditors.begin() + i);
207 break;
208 }
209 }
210
211 ImGui::Separator();
212 }
213
214 if (ImGui::Button("Add##CPUNE"))
215 {
216 while (*isRemeshing);
217
218 cpuNodeEditors.push_back(new CPUNodeEditor(appState));
219 }
220
221 ImGui::Separator();
222 ImGui::Text("Time : %lf ms", time);
223 ImGui::End();
224 }
225
226 for (int i = 0; i < cpuNoiseLayers.size(); i++)
227 {
228 cpuNoiseLayers[i]->Update();
229 }
230
231 for (int i = 0; i < gpuNoiseLayers.size(); i++)
232 {
233 gpuNoiseLayers[i]->Update();
234 }
235
236 for (int i = 0; i < cpuNodeEditors.size(); i++)
237 {
238 cpuNodeEditors[i]->Update();
239 }
240}