SpiecsEngine
 
Loading...
Searching...
No Matches
ImguiCreateEntity.cpp
Go to the documentation of this file.
1/**
2* @file ImguiCreateEntity.cpp.
3* @brief The ImguiCreateEntity Class Implementation.
4* @author Spices.
5*/
6
7#include "Pchheader.h"
9
10#include "Systems/SlateSystem.h"
11
12namespace Spices {
13
15 const std::string& panelName ,
16 FrameInfo& frameInfo
17 )
18 : ImguiSlate(panelName, frameInfo)
19 {}
20
22 {
24
25 /**
26 * @brief Begin render Create.
27 */
28 if (ImGui::BeginMenu("Create"))
29 {
31
32 /**
33 * @brief Begin render Mesh.
34 */
35 {
36 SPICES_PROFILE_ZONEN("Render Mesh");
37
38 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_POLYMER, Mesh)))
39 {
40 if (ImGui::MenuItem("Cone")) {}
41 if (ImGui::MenuItem("Cube"))
42 {
43 WorldFunctions::CreateMeshEntity(FrameInfo::Get().m_World.get(), "Cube", []() {
44 auto pack = std::make_shared<CubePack>();
45 pack->SetMaterial("BasePassRenderer.Mesh.Default");
46 return Mesh::Builder().AddPack(pack).Build();
47 });
48 }
49 if (ImGui::MenuItem("Cylinder")) {}
50 if (ImGui::MenuItem("Disk")) {}
51 if (ImGui::MenuItem("Plane"))
52 {
53 WorldFunctions::CreateMeshEntity(FrameInfo::Get().m_World.get(), "Plane", []() {
54 auto pack = std::make_shared<PlanePack>();
55 pack->SetMaterial("BasePassRenderer.Mesh.Default");
56 return Mesh::Builder().AddPack(pack).Build();
57 });
58 }
59 if (ImGui::MenuItem("Sphere"))
60 {
61 WorldFunctions::CreateMeshEntity(FrameInfo::Get().m_World.get(), "Sphere", []() {
62 auto pack = std::make_shared<SpherePack>();
63 pack->SetMaterial("BasePassRenderer.Mesh.Default");
64 return Mesh::Builder().AddPack(pack).Build();
65 });
66 }
67 if (ImGui::MenuItem("Torus")) {}
68 ImGui::Separator();
69 if (ImGui::MenuItem("Settings")) {}
70
71 ImGui::EndMenu();
72 }
73 }
74
75 /**
76 * @brief Begin render Shape.
77 */
78 {
79 SPICES_PROFILE_ZONEN("Render Shape");
80
81 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_FORMAT_SHAPES, Shape)))
82 {
83 if (ImGui::MenuItem("Capsule")) {}
84 if (ImGui::MenuItem("Cone")) {}
85 if (ImGui::MenuItem("Cube")) {}
86 if (ImGui::MenuItem("Cylinder")) {}
87 if (ImGui::MenuItem("Sphere")) {}
88 ImGui::Separator();
89 bool isHighQuality = true;
90 if (ImGui::Checkbox("High Quality", &isHighQuality)) {}
91
92 ImGui::EndMenu();
93 }
94 }
95
96 /**
97 * @brief Begin render Light.
98 */
99 {
100 SPICES_PROFILE_ZONEN("Render Light");
101
102 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_WB_TWIGHLIGHT, Light)))
103 {
104 if (ImGui::MenuItem("Cylinder Light")) {}
105 if (ImGui::MenuItem("Disk Light")) {}
106 if (ImGui::MenuItem("Distance Light")) {}
107 if (ImGui::MenuItem("Dome Light")) {}
108 if (ImGui::MenuItem("Rect Light")) {}
109 if (ImGui::MenuItem("Sphere Light")) {}
110
111 ImGui::EndMenu();
112 }
113 }
114
115 /**
116 * @brief Begin render Audio.
117 */
118 {
119 SPICES_PROFILE_ZONEN("Render Audio");
120
121 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_MULTITRACK_AUDIO, Audio)))
122 {
123 if (ImGui::MenuItem("Spatial Sound")) {}
124 if (ImGui::MenuItem("Non-Spatial Sound")) {}
125 if (ImGui::MenuItem("Listener")) {}
126
127 ImGui::EndMenu();
128 }
129 }
130
131 /**
132 * @brief Begin render Camera.
133 */
134 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_VIDEO_CAMERA_FRONT, Camera))) {}
135
136 /**
137 * @brief Begin render Scope.
138 */
139 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_FOLDER, Scope))) {}
140
141 /**
142 * @brief Begin render Xform.
143 */
144 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_LINE_AXIS, Xform))) {}
145
146 /**
147 * @brief Begin render Material.
148 */
149 {
150 SPICES_PROFILE_ZONEN("Render Material");
151
152 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_PANORAMA_PHOTOSPHERE_SELECT, Material)))
153 {
154 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
155 ImGui::SeparatorText("Advanced");
156 ImGui::PopStyleColor();
157 if (ImGui::MenuItem("Surface")) {}
158 if (ImGui::MenuItem("SurfaceBlend")) {}
159 if (ImGui::MenuItem("SurfaceLite")) {}
160 if (ImGui::BeginMenu("SurfacePresets"))
161 {
162 if (ImGui::MenuItem("Surface IncandescentBulb")) {}
163 if (ImGui::MenuItem("Surface BrushMetal")) {}
164 if (ImGui::MenuItem("Surface Chrome")) {}
165 if (ImGui::MenuItem("Surface Copper")) {}
166 if (ImGui::MenuItem("Surface Gold")) {}
167 if (ImGui::MenuItem("Surface Foam")) {}
168 if (ImGui::MenuItem("Surface Rubber")) {}
169 if (ImGui::MenuItem("Surface CarPaint")) {}
170 if (ImGui::MenuItem("Surface CarPaintMetallic")) {}
171 if (ImGui::MenuItem("Surface GlossyPaint")) {}
172 if (ImGui::MenuItem("Surface TwoToneCarPaint")) {}
173 if (ImGui::MenuItem("Surface Default")) {}
174 if (ImGui::MenuItem("Surface PeanutButter")) {}
175 if (ImGui::MenuItem("Surface SkimMilk")) {}
176 if (ImGui::MenuItem("Surface WholeMilk")) {}
177 if (ImGui::MenuItem("Surface Ceramic")) {}
178 if (ImGui::MenuItem("Surface Clay")) {}
179 if (ImGui::MenuItem("Surface Plastic")) {}
180 if (ImGui::MenuItem("Surface Skin1")) {}
181 if (ImGui::MenuItem("Surface Skin2")) {}
182 if (ImGui::MenuItem("Surface Skin3")) {}
183 if (ImGui::MenuItem("Surface Skin4")) {}
184 if (ImGui::MenuItem("Surface Velvet")) {}
185 if (ImGui::MenuItem("Surface Honey")) {}
186 if (ImGui::MenuItem("Surface MapleSyrup")) {}
187 if (ImGui::MenuItem("Surface OrangeJuice")) {}
188 if (ImGui::MenuItem("Surface DustedGlass")) {}
189 if (ImGui::MenuItem("Surface FrostedGlass")) {}
190 if (ImGui::MenuItem("Surface Glass")) {}
191 if (ImGui::MenuItem("Surface Blood")) {}
192 if (ImGui::MenuItem("Surface Bubble")) {}
193 if (ImGui::MenuItem("Surface Wax")) {}
194 if (ImGui::MenuItem("Surface Polyethylene")) {}
195 if (ImGui::MenuItem("Surface Diamond")) {}
196 if (ImGui::MenuItem("Surface Jade")) {}
197 if (ImGui::MenuItem("Surface ClearWater")) {}
198 if (ImGui::MenuItem("Surface DeepWater")) {}
199
200 ImGui::EndMenu();
201 }
202 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
203 ImGui::SeparatorText("Base");
204 ImGui::PopStyleColor();
205 if (ImGui::MenuItem("Glass")) {}
206 if (ImGui::MenuItem("PBR")) {}
207 if (ImGui::MenuItem("PBRBase")) {}
208 if (ImGui::MenuItem("PBR ClearCoat")) {}
209 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
210 ImGui::SeparatorText("Hair");
211 ImGui::PopStyleColor();
212 if (ImGui::MenuItem("Hair")) {}
213 if (ImGui::BeginMenu("HairPresets"))
214 {
215 if (ImGui::MenuItem("Hair Blonde")) {}
216 if (ImGui::MenuItem("Hair Brown")) {}
217 if (ImGui::MenuItem("Hair Auburn")) {}
218 if (ImGui::MenuItem("Hair Black")) {}
219 if (ImGui::MenuItem("Hair Wet")) {}
220
221 ImGui::EndMenu();
222 }
223 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
224 ImGui::SeparatorText("SimReady");
225 ImGui::PopStyleColor();
226 if (ImGui::MenuItem("SimPBR")) {}
227 if (ImGui::MenuItem("SimPBR Translucent")) {}
228 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
229 ImGui::SeparatorText("Volumes");
230 ImGui::PopStyleColor();
231 if (ImGui::MenuItem("VolumeDensity")) {}
232 if (ImGui::BeginMenu("VolumeNoise"))
233 {
234 if (ImGui::MenuItem("VolumeWorleyNoise")) {}
235 if (ImGui::MenuItem("VolumePerlinNoise")) {}
236
237 ImGui::EndMenu();
238 }
239 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
240 ImGui::SeparatorText("Usd Materials");
241 ImGui::PopStyleColor();
242 if (ImGui::MenuItem("USD Preview Surface")) {}
243 if (ImGui::MenuItem("USD Preview Surface Texture")) {}
244 if (ImGui::MenuItem("Add MDL File")) {}
245 if (ImGui::MenuItem("Create MDL Graph")) {}
246
247 ImGui::EndMenu();
248 }
249 }
250
251 /**
252 * @brief Begin render Physics.
253 */
254 {
255 SPICES_PROFILE_ZONEN("Render Physics");
256
257 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_WATERFALL_CHART, Physics)))
258 {
259 if (ImGui::MenuItem("Physics Scene")) {}
260 if (ImGui::MenuItem("Ground Plane")) {}
261 if (ImGui::MenuItem("Physical Material")) {}
262 if (ImGui::MenuItem("Collision Group")) {}
263 if (ImGui::BeginMenu("Joint"))
264 {
265 if (ImGui::MenuItem("D6 Joint")) {}
266 if (ImGui::MenuItem("Fixed Joint")) {}
267 if (ImGui::MenuItem("Revolute Joint")) {}
268 if (ImGui::MenuItem("Prismatic Joint")) {}
269 if (ImGui::MenuItem("Spherical Joint")) {}
270 if (ImGui::MenuItem("Distance Joint")) {}
271 if (ImGui::MenuItem("Gear Joint")) {}
272 if (ImGui::MenuItem("Rack and Pinion Joint")) {}
273
274 ImGui::EndMenu();
275 }
276 if (ImGui::MenuItem("Particle System")) {}
277 if (ImGui::MenuItem("Vehicle")) {}
278 if (ImGui::MenuItem("Tire Friction Table")) {}
279
280 ImGui::EndMenu();
281 }
282 }
283
284 /**
285 * @brief Begin render Flow.
286 */
287 {
288 SPICES_PROFILE_ZONEN("Render Flow");
289
290 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_FLOOD, Flow)))
291 {
292 if (ImGui::MenuItem("Sphere Emitter")) {}
293 if (ImGui::MenuItem("Box Emitter")) {}
294 if (ImGui::MenuItem("Point Emitter")) {}
295 if (ImGui::MenuItem("Mesh Emitter")) {}
296 if (ImGui::MenuItem("Texture Emitter")) {}
297 if (ImGui::MenuItem("NanoVDB Emitter")) {}
298 ImGui::Separator();
299 if (ImGui::MenuItem("Simulate Properties")) {}
300 if (ImGui::MenuItem("Offscreen Properties")) {}
301 if (ImGui::MenuItem("Render Properties")) {}
302 if (ImGui::MenuItem("Isosurface Properties")) {}
303
304 ImGui::EndMenu();
305 }
306 }
307
308
309
310 /**
311 * @brief Begin render Flow.
312 */
313 {
314 SPICES_PROFILE_ZONEN("Render Particles");
315
316 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_FORMAT_SHAPES, Particles)))
317 {
318 if (ImGui::MenuItem("with Geometry Replicator")) {}
319 if (ImGui::MenuItem("with Point Instancer")) {}
320 if (ImGui::MenuItem("with Particle Visualizer")) {}
321 if (ImGui::MenuItem("Point Cloud Flow Emitter")) {}
322 if (ImGui::MenuItem("Material")) {}
323 if (ImGui::MenuItem("Sprite")) {}
324 if (ImGui::MenuItem("Mesh")) {}
325 if (ImGui::MenuItem("PointInstancer")) {}
326 if (ImGui::MenuItem("Prototypes")) {}
327 if (ImGui::MenuItem("Slate")) {}
328 if (ImGui::MenuItem("FlowEmitterPoint")) {}
329
330 ImGui::EndMenu();
331 }
332 }
333
334 /**
335 * @brief Begin render Sequence.
336 */
337 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_VIDEO_CAMERA_FRONT, Sequence))) {}
338
339 /**
340 * @brief Begin render Navigation.
341 */
342 {
343 SPICES_PROFILE_ZONEN("Render Navigation");
344
345 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_NAVIGATION, Navigation)))
346 {
347 if (ImGui::MenuItem("NavMesh Volume")) {}
348
349 ImGui::EndMenu();
350 }
351 }
352
353 /**
354 * @brief Begin render Visual Scripting.
355 */
356 {
357 SPICES_PROFILE_ZONEN("Render Visual Scripting");
358
359 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_JAVASCRIPT, Visual Scripting)))
360 {
361 if (ImGui::MenuItem("Action Graph")) {}
362 if (ImGui::MenuItem("Push Graph")) {}
363 if (ImGui::MenuItem("Lazy Graph")) {}
364
365 ImGui::EndMenu();
366 }
367 }
368
369 /**
370 * @brief Begin render BasisCurves.
371 */
372 {
373 SPICES_PROFILE_ZONEN("Render BasisCurves");
374
375 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_POLYLINE, BasisCurves)))
376 {
377 if (ImGui::MenuItem("Create Curve Deformer")) {}
378 if (ImGui::BeginMenu("Graph"))
379 {
380 if (ImGui::MenuItem("Curve from Xformables")) {}
381 if (ImGui::MenuItem("Extract Curve Data")) {}
382 if (ImGui::MenuItem("Tag Curves with Ramp")) {}
383 if (ImGui::MenuItem("Resample Curves")) {}
384
385 ImGui::EndMenu();
386 }
387 if (ImGui::MenuItem("New Curve")) {}
388
389 ImGui::EndMenu();
390 }
391 }
392
393 /**
394 * @brief Begin render Animation.
395 */
396 {
397 SPICES_PROFILE_ZONEN("Render Animation");
398
399 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_ANIMATION, Animation)))
400 {
401 if (ImGui::MenuItem("Animation Graph")) {}
402
403 ImGui::EndMenu();
404 }
405 }
406
407 /**
408 * @brief Begin render UI.
409 */
410 {
411 SPICES_PROFILE_ZONEN("Render UI");
412
413 if (ImGui::BeginMenu(ICON_TEXT(ICON_MD_SQUARE, UI)))
414 {
415 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
416 ImGui::SeparatorText("Containers");
417 ImGui::PopStyleColor();
418 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Frame))) {}
419 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, ScrollingFrame))) {}
420 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, CollapsableFrame))) {}
421 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, HStack))) {}
422 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, VStack))) {}
423 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, ZStack))) {}
424 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Placer))) {}
425 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
426 ImGui::SeparatorText("Widgets");
427 ImGui::PopStyleColor();
428
429 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Button))) {}
430 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Image))) {}
431 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Rectangle))) {}
432 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Spacer))) {}
433 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Label))) {}
434 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Line))) {}
435 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Circle))) {}
436 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Triangle))) {}
437 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
438 ImGui::SeparatorText("Style");
439 ImGui::PopStyleColor();
440
441 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, StyleContainer))) {}
442 if (ImGui::MenuItem(ICON_TEXT(ICON_EMPTY, Style))) {}
443 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.5f, 0.5f, 0.5f, 1.0f));
444 ImGui::SeparatorText("Window");
445 ImGui::PopStyleColor();
446
447 if (ImGui::MenuItem("Viewport Frame")) {}
448 if (ImGui::MenuItem("Window Frame")) {}
449
450 ImGui::EndMenu();
451 }
452 }
453
454 /**
455 * @brief Begin render AOV.
456 */
457 if (ImGui::MenuItem(ICON_TEXT(ICON_MD_INSERT_PHOTO, AOV))) {}
458
459
460 /**
461 * @brief End render Create.
462 */
463 ImGui::EndMenu();
464 }
465 }
466}
#define ICON_TEXT(icon, text)
Definition ImguiHelper.h:24
#define ICON_EMPTY
Definition ImguiHelper.h:26
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
CubePack Class. This class defines box type mesh pack.
Definition MeshPack.h:446
static FrameInfo & Get()
Get FrameInfo.
Definition FrameInfo.cpp:14
FrameInfo Class. This class defines the FrameInfo data.
Definition FrameInfo.h:32
static void MainMenuTitleSeparator()
Draw main menu titile separator.
The ImGuiH Class. This class defines helper function for slate render.
Definition ImguiHelper.h:61
virtual void OnRender() override
This interface is called On SlateRenderer Render.
ImguiCreateEntity(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function.
The ImguiCreateEntity Class. This class defines how to render a Create.
ImguiSlate(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function. Init with Slate's name.
Definition ImguiUtils.h:35
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit fro...
Definition ImguiUtils.h:27
PlanePack Class. This class defines plane type mesh pack.
Definition MeshPack.h:397
SpherePack Class. This class defines sphere type mesh pack.
Definition MeshPack.h:494
World Functions Class.