Visual Computing Library  devel
Loading...
Searching...
No Matches
mesh_viewer_imgui_drawer.h
1/*****************************************************************************
2 * VCLib *
3 * Visual Computing Library *
4 * *
5 * Copyright(C) 2021-2025 *
6 * Visual Computing Lab *
7 * ISTI - Italian National Research Council *
8 * *
9 * All rights reserved. *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the Mozilla Public License Version 2.0 as published *
13 * by the Mozilla Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * Mozilla Public License Version 2.0 *
20 * (https://www.mozilla.org/en-US/MPL/2.0/) for more details. *
21 ****************************************************************************/
22
23#ifndef VCL_IMGUI_MESH_VIEWER_IMGUI_DRAWER_H
24#define VCL_IMGUI_MESH_VIEWER_IMGUI_DRAWER_H
25
26#include "imgui_helpers.h"
27
28#include <vclib/render/drawable/drawable_mesh.h>
29#include <vclib/render/drawers/trackball_viewer_drawer.h>
30
31#include <imgui.h>
32
33#include <algorithm>
34#include <iterator>
35#include <numeric>
36
37namespace vcl::imgui {
38
39template<typename DerivedRenderApp>
41 public vcl::TrackBallViewerDrawer<DerivedRenderApp>
42{
44
45 // selected mesh index
46 int mMeshIndex = 0;
47
48public:
49 using Base::Base;
50
51 virtual void onDraw(vcl::uint viewId) override
52 {
53 // draw parent
54 Base::onDraw(viewId);
55
56 // draw imgui
57 ImGui::Begin("Meshes");
58
59 // mesh table
60 {
63 ImGui::BeginChild(
64 "##ListContainer",
65 ImVec2(ImGui::GetContentRegionAvail().x, 260),
68 drawMeshList();
69 ImGui::EndChild();
70 }
71
72 // drawable mesh info and settings for selected mesh
73 if (mMeshIndex >= 0 && mMeshIndex < Base::mDrawList->size()) {
74 auto drawable =
75 std::dynamic_pointer_cast<vcl::AbstractDrawableMesh>(
76 Base::mDrawList->at(mMeshIndex));
77 if (drawable) {
78 drawMeshSettings(*drawable);
79 }
80 }
81
82 ImGui::End();
83 }
84
85 void onMousePress(
86 MouseButton::Enum button,
87 double x,
88 double y,
89 const KeyModifiers& modifiers) override
90 {
91 if (button == MouseButton::RIGHT) {
92 this->readIdRequest(x, y, [&](uint id) {
93 if (id == UINT_NULL)
94 return;
95
96 mMeshIndex = id;
97 std::cout << "Selected ID: " << id << std::endl;
98 });
99 }
100
101 Base::onMousePress(button, x, y, modifiers);
102 }
103
104private:
105 void drawMeshList()
106 {
107 if (!Base::mDrawList || Base::mDrawList->empty()) {
108 ImGui::Text("No objects loaded");
109 return;
110 }
111
112 int meshId = 0;
114 if (ImGui::BeginTable("meshtable", 2, meshTableFlags)) {
115 ImGui::TableSetupColumn(
117 ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthStretch);
118 for (auto& d : *(Base::mDrawList)) {
119 auto& drawable = *d;
120 ImGui::TableNextRow();
121
122 ImGui::PushID(meshId++);
123
124 ImGui::TableSetColumnIndex(0);
125
126 // visibility checkbox
127 ImGui::Checkbox(
128 "##Visible",
129 [&] {
130 return drawable.isVisible();
131 },
132 [&](bool vis) {
133 drawable.setVisibility(vis);
134 });
135
136 ImGui::TableSetColumnIndex(1);
137
138 // row selection
139 bool isSelected = (mMeshIndex == meshId - 1);
140 if (ImGui::Selectable(
141 drawable.name().c_str(),
142 isSelected,
144 mMeshIndex = meshId - 1;
145 }
146 // tooltip with info
147 if (!drawable.info().empty() &&
148 ImGui::IsItemHovered(ImGuiHoveredFlags_ForTooltip)) {
149 ImGui::BeginTooltip();
150 ImGui::Text("%s", drawable.info().c_str());
151 ImGui::EndTooltip();
152 }
153 ImGui::PopID();
154 }
155 ImGui::EndTable();
156 }
157 }
158
159 static void drawMeshPointSettings(
161 vcl::MeshRenderSettings& settings)
162 {
164
165 ImGui::BeginDisabled(!settings.canPoints(VISIBLE));
166
167 // visibility
168 ImGui::Checkbox(
169 "Visible",
170 [&] {
171 return settings.isPoints(VISIBLE);
172 },
173 [&](bool vis) {
174 settings.setPoints(VISIBLE, vis);
175 });
176
177 // shape
178 ImGui::Text("Shape:");
179 ImGui::SameLine();
180 ImGui::RadioButton(
181 "Circle",
182 [&] {
183 return settings.isPoints(SHAPE_CIRCLE);
184 },
185 [&](bool v) {
186 if (v)
187 settings.setPoints(SHAPE_CIRCLE);
188 });
189 ImGui::SameLine();
190 ImGui::RadioButton(
191 "Pixel",
192 [&] {
193 return settings.isPoints(SHAPE_PIXEL);
194 },
195 [&](bool v) {
196 if (v)
197 settings.setPoints(SHAPE_PIXEL);
198 });
199
200 // shading
201 ImGui::Text("Shading:");
202 ImGui::SameLine();
203 ImGui::BeginDisabled(!settings.canPoints(SHADING_VERT));
204 ImGui::RadioButton(
205 "Vertex",
206 [&] {
207 return settings.isPoints(SHADING_VERT);
208 },
209 [&](bool v) {
210 if (v)
211 settings.setPoints(SHADING_VERT);
212 });
213 ImGui::SameLine();
214 ImGui::EndDisabled();
215 ImGui::RadioButton(
216 "None",
217 [&] {
218 return settings.isPoints(SHADING_NONE);
219 },
220 [&](bool vis) {
221 if (vis)
222 settings.setPoints(SHADING_NONE);
223 });
224
225 // color
226 ImGui::Text("Color:");
227 ImGui::SameLine();
228 const char* pointColorNames[] = {"Vertex", "Mesh", "User"};
229 const std::array<bool, 3> colorSelected = {
230 settings.isPoints(COLOR_VERTEX),
231 settings.isPoints(COLOR_MESH),
232 settings.isPoints(COLOR_USER)};
233
234 assert(
235 std::accumulate(
236 std::begin(colorSelected), std::end(colorSelected), 0) == 1);
237 int idx = std::distance(
238 std::begin(colorSelected),
239 std::find(
240 std::begin(colorSelected), std::end(colorSelected), true));
241 assert(idx >= 0 && idx < 3);
242
243 ImGui::SetNextItemWidth(-40);
244 if (ImGui::BeginCombo("##ComboPointColor", pointColorNames[idx])) {
245 for (int n = 0; n < IM_ARRAYSIZE(pointColorNames); n++) {
246 const bool selected = (n == idx);
247
248 switch (n) {
249 case 0:
250 ImGui::BeginDisabled(!settings.canPoints(COLOR_VERTEX));
251 if (ImGui::Selectable(pointColorNames[n], selected))
252 settings.setPoints(COLOR_VERTEX);
253 ImGui::EndDisabled();
254 break;
255 case 1:
256 ImGui::BeginDisabled(!settings.canPoints(COLOR_MESH));
257 if (ImGui::Selectable(pointColorNames[n], selected))
258 settings.setPoints(COLOR_MESH);
259 ImGui::EndDisabled();
260 break;
261 case 2:
262 if (ImGui::Selectable(pointColorNames[n], selected))
263 settings.setPoints(COLOR_USER);
264 break;
265 default: assert(false); break;
266 }
267 if (selected)
268 ImGui::SetItemDefaultFocus();
269 }
270 ImGui::EndCombo();
271 }
272 // user color picker
273 ImGui::SameLine();
274 ImGui::BeginDisabled(!settings.isPoints(COLOR_USER));
275 ImGui::ColorEdit4(
276 "##PointColor",
277 [&] {
278 return settings.pointUserColor();
279 },
280 [&](vcl::Color c) {
281 settings.setPointsUserColor(c);
282 },
284 ImGui::EndDisabled();
285
286 // point size
287 ImGui::Text("Size:");
288 // set the width of the window minus the width of the label
289 ImGui::SameLine();
290 ImGui::SetNextItemWidth(-10);
291 ImGui::SliderFloat(
292 "##PointSize",
293 [&] {
294 return settings.pointWidth();
295 },
296 [&](float v) {
297 settings.setPointsWidth(v);
298 },
299 1.0f,
300 32.0f);
301
302 ImGui::EndDisabled();
303 }
304
305 static void drawMeshSurfaceSettings(
307 vcl::MeshRenderSettings& settings)
308 {
310
311 ImGui::BeginDisabled(!settings.canSurface(VISIBLE));
312
313 // visibility
314 ImGui::Checkbox(
315 "Visible",
316 [&] {
317 return settings.isSurface(VISIBLE);
318 },
319 [&](bool vis) {
320 settings.setSurface(VISIBLE, vis);
321 });
322
323 // shading
324 assert(
325 (settings.isSurface(SHADING_SMOOTH) +
326 settings.isSurface(SHADING_FLAT) +
327 settings.isSurface(SHADING_NONE)) == 1);
328 ImGui::Text("Shading:");
329 ImGui::SameLine();
330 ImGui::RadioButton(
331 "Smooth",
332 [&] {
333 return settings.isSurface(SHADING_SMOOTH);
334 },
335 [&](bool vis) {
336 if (vis)
337 settings.setSurface(SHADING_SMOOTH);
338 });
339 ImGui::SameLine();
340 ImGui::RadioButton(
341 "Flat",
342 [&] {
343 return settings.isSurface(SHADING_FLAT);
344 },
345 [&](bool vis) {
346 if (vis)
347 settings.setSurface(SHADING_FLAT);
348 });
349 ImGui::SameLine();
350 ImGui::RadioButton(
351 "None",
352 [&] {
353 return settings.isSurface(SHADING_NONE);
354 },
355 [&](bool vis) {
356 if (vis)
357 settings.setSurface(SHADING_NONE);
358 });
359
360 // color
361 ImGui::Text("Color:");
362 ImGui::SameLine();
363 const char* surfColorNames[] = {
364 "Vertex", "Face", "Mesh", "PerVertexTex", "PerWedgeTex", "User"};
365 const std::array<bool, 6> colorSelected = {
366 settings.isSurface(COLOR_VERTEX),
367 settings.isSurface(COLOR_FACE),
368 settings.isSurface(COLOR_MESH),
369 settings.isSurface(COLOR_VERTEX_TEX),
370 settings.isSurface(COLOR_WEDGE_TEX),
371 settings.isSurface(COLOR_USER)};
372 assert(
373 std::accumulate(
374 std::begin(colorSelected), std::end(colorSelected), 0) == 1);
375 int idx = std::distance(
376 std::begin(colorSelected),
377 std::find(
378 std::begin(colorSelected), std::end(colorSelected), true));
379 assert(idx >= 0 && idx < 6);
380 ImGui::SetNextItemWidth(-40);
381 if (ImGui::BeginCombo("##ComboSurfColor", surfColorNames[idx])) {
382 for (int n = 0; n < IM_ARRAYSIZE(surfColorNames); n++) {
383 const bool selected = (n == idx);
384
385 switch (n) {
386 case 0:
387 ImGui::BeginDisabled(!settings.canSurface(COLOR_VERTEX));
388 if (ImGui::Selectable(surfColorNames[n], selected))
389 settings.setSurface(COLOR_VERTEX);
390 ImGui::EndDisabled();
391 break;
392 case 1:
393 ImGui::BeginDisabled(!settings.canSurface(COLOR_FACE));
394 if (ImGui::Selectable(surfColorNames[n], selected))
395 settings.setSurface(COLOR_FACE);
396 ImGui::EndDisabled();
397 break;
398 case 2:
399 ImGui::BeginDisabled(!settings.canSurface(COLOR_MESH));
400 if (ImGui::Selectable(surfColorNames[n], selected))
401 settings.setSurface(COLOR_MESH);
402 ImGui::EndDisabled();
403 break;
404 case 3:
405 ImGui::BeginDisabled(
406 !settings.canSurface(COLOR_VERTEX_TEX));
407 if (ImGui::Selectable(surfColorNames[n], selected))
408 settings.setSurface(COLOR_VERTEX_TEX);
409 ImGui::EndDisabled();
410 break;
411 case 4:
412 ImGui::BeginDisabled(!settings.canSurface(COLOR_WEDGE_TEX));
413 if (ImGui::Selectable(surfColorNames[n], selected))
414 settings.setSurface(COLOR_WEDGE_TEX);
415 ImGui::EndDisabled();
416 break;
417 case 5:
418 if (ImGui::Selectable(surfColorNames[n], selected))
419 settings.setSurface(COLOR_USER);
420 break;
421 default: assert(false); break;
422 }
423 if (selected)
424 ImGui::SetItemDefaultFocus();
425 }
426 ImGui::EndCombo();
427 }
428 // user color picker
429 ImGui::SameLine();
430 ImGui::BeginDisabled(!settings.isSurface(COLOR_USER));
431 ImGui::ColorEdit4(
432 "##SurfUserColor",
433 [&] {
434 return settings.surfaceUserColor();
435 },
436 [&](vcl::Color c) {
437 settings.setSurfaceUserColor(c);
438 },
440 ImGui::EndDisabled();
441
442 ImGui::EndDisabled();
443 }
444
445 static void drawMeshWireframeSettings(
447 vcl::MeshRenderSettings& settings)
448 {
450
451 ImGui::BeginDisabled(!settings.canWireframe(VISIBLE));
452
453 // visibility
454 ImGui::Checkbox(
455 "Visible",
456 [&] {
457 return settings.isWireframe(VISIBLE);
458 },
459 [&](bool v) {
460 settings.setWireframe(VISIBLE, v);
461 });
462
463 // shading
464 assert(
465 settings.isWireframe(SHADING_VERT) !=
466 settings.isWireframe(SHADING_NONE));
467 ImGui::Text("Shading:");
468 ImGui::SameLine();
469 ImGui::RadioButton(
470 "Vertex",
471 [&] {
472 return settings.isWireframe(SHADING_VERT);
473 },
474 [&](bool vis) {
475 if (vis)
476 settings.setWireframe(SHADING_VERT);
477 });
478 ImGui::SameLine();
479 ImGui::RadioButton(
480 "None",
481 [&] {
482 return settings.isWireframe(SHADING_NONE);
483 },
484 [&](bool vis) {
485 if (vis)
486 settings.setWireframe(SHADING_NONE);
487 });
488
489 // color
490 ImGui::Text("Color:");
491 ImGui::SameLine();
492 const char* wireColorNames[] = {"Vertex", "Mesh", "User"};
493 const std::array<bool, 3> colorSelected = {
494 settings.isWireframe(COLOR_VERTEX),
495 settings.isWireframe(COLOR_MESH),
496 settings.isWireframe(COLOR_USER)};
497 assert(
498 std::accumulate(
499 std::begin(colorSelected), std::end(colorSelected), 0) == 1);
500 int idx = std::distance(
501 std::begin(colorSelected),
502 std::find(
503 std::begin(colorSelected), std::end(colorSelected), true));
504 assert(idx >= 0 && idx < 3);
505 ImGui::SetNextItemWidth(-40);
506 if (ImGui::BeginCombo("##ComboWireColor", wireColorNames[idx])) {
507 for (int n = 0; n < IM_ARRAYSIZE(wireColorNames); n++) {
508 const bool selected = (n == idx);
509
510 switch (n) {
511 case 0:
512 ImGui::BeginDisabled(!settings.canWireframe(COLOR_VERTEX));
513 if (ImGui::Selectable(wireColorNames[n], selected))
514 settings.setWireframe(COLOR_VERTEX);
515 ImGui::EndDisabled();
516 break;
517 case 1:
518 ImGui::BeginDisabled(!settings.canWireframe(COLOR_MESH));
519 if (ImGui::Selectable(wireColorNames[n], selected))
520 settings.setWireframe(COLOR_MESH);
521 ImGui::EndDisabled();
522 break;
523 case 2:
524 if (ImGui::Selectable(wireColorNames[n], selected))
525 settings.setWireframe(COLOR_USER);
526 break;
527 default: assert(false); break;
528 }
529 if (selected)
530 ImGui::SetItemDefaultFocus();
531 }
532 ImGui::EndCombo();
533 }
534 // user color picker
535 ImGui::SameLine();
536 ImGui::BeginDisabled(!settings.isWireframe(COLOR_USER));
537 ImGui::ColorEdit4(
538 "##WireUserColor",
539 [&] {
540 return settings.wireframeUserColor();
541 },
542 [&](vcl::Color c) {
543 settings.setWireframeUserColor(c);
544 },
546 ImGui::EndDisabled();
547
548 ImGui::EndDisabled();
549 }
550
551 static void drawMeshEdgeSettings(
553 vcl::MeshRenderSettings& settings)
554 {
556
557 ImGui::BeginDisabled(!settings.canEdges(VISIBLE));
558
559 // visibility
560 ImGui::Checkbox(
561 "Visible",
562 [&] {
563 return settings.isEdges(VISIBLE);
564 },
565 [&](bool v) {
566 settings.setEdges(VISIBLE, v);
567 });
568
569 // shading
570 assert(
571 (settings.isEdges(SHADING_SMOOTH) + settings.isEdges(SHADING_FLAT) +
572 settings.isEdges(SHADING_NONE)) == 1);
573 ImGui::Text("Shading:");
574 ImGui::SameLine();
575 ImGui::BeginDisabled(!settings.canEdges(SHADING_SMOOTH));
576 ImGui::RadioButton(
577 "Smooth",
578 [&] {
579 return settings.isEdges(SHADING_SMOOTH);
580 },
581 [&](bool v) {
582 if (v)
583 settings.setEdges(SHADING_SMOOTH);
584 });
585 ImGui::EndDisabled();
586 ImGui::SameLine();
587 ImGui::BeginDisabled(!settings.canEdges(SHADING_FLAT));
588 ImGui::RadioButton(
589 "Flat",
590 [&] {
591 return settings.isEdges(SHADING_FLAT);
592 },
593 [&](bool v) {
594 if (v)
595 settings.setEdges(SHADING_FLAT);
596 });
597 ImGui::EndDisabled();
598 ImGui::SameLine();
599 ImGui::BeginDisabled(!settings.canEdges(SHADING_NONE));
600 ImGui::RadioButton(
601 "None",
602 [&] {
603 return settings.isEdges(SHADING_NONE);
604 },
605 [&](bool vis) {
606 if (vis)
607 settings.setEdges(SHADING_NONE);
608 });
609 ImGui::EndDisabled();
610
611 // color
612 ImGui::Text("Color:");
613 ImGui::SameLine();
614 const char* edgeColorNames[] = {"Vertex", "Edge", "Mesh", "User"};
615 const std::array<bool, 4> colorSelected = {
616 settings.isEdges(COLOR_VERTEX),
617 settings.isEdges(COLOR_EDGE),
618 settings.isEdges(COLOR_MESH),
619 settings.isEdges(COLOR_USER)};
620 assert(
621 std::accumulate(
622 std::begin(colorSelected), std::end(colorSelected), 0) == 1);
623 int idx = std::distance(
624 std::begin(colorSelected),
625 std::find(
626 std::begin(colorSelected), std::end(colorSelected), true));
627 assert(idx >= 0 && idx < 4);
628 ImGui::SetNextItemWidth(-40);
629 if (ImGui::BeginCombo("##ComboEdgeColor", edgeColorNames[idx])) {
630 for (int n = 0; n < IM_ARRAYSIZE(edgeColorNames); n++) {
631 const bool selected = (n == idx);
632
633 switch (n) {
634 case 0:
635 ImGui::BeginDisabled(!settings.canEdges(COLOR_VERTEX));
636 if (ImGui::Selectable(edgeColorNames[n], selected))
637 settings.setEdges(COLOR_VERTEX);
638 ImGui::EndDisabled();
639 break;
640 case 1:
641 ImGui::BeginDisabled(!settings.canEdges(COLOR_EDGE));
642 if (ImGui::Selectable(edgeColorNames[n], selected))
643 settings.setEdges(COLOR_EDGE);
644 ImGui::EndDisabled();
645 break;
646 case 2:
647 ImGui::BeginDisabled(!settings.canEdges(COLOR_MESH));
648 if (ImGui::Selectable(edgeColorNames[n], selected))
649 settings.setEdges(COLOR_MESH);
650 ImGui::EndDisabled();
651 break;
652 case 3:
653 if (ImGui::Selectable(edgeColorNames[n], selected))
654 settings.setEdges(COLOR_USER);
655 break;
656 default: assert(false); break;
657 }
658 if (selected)
659 ImGui::SetItemDefaultFocus();
660 }
661 ImGui::EndCombo();
662 }
663 // user color picker
664 ImGui::SameLine();
665 ImGui::BeginDisabled(!settings.isEdges(COLOR_USER));
666 ImGui::ColorEdit4(
667 "##EdgeUserColor",
668 [&] {
669 return settings.edgesUserColor();
670 },
671 [&](vcl::Color c) {
672 settings.setEdgesUserColor(c);
673 },
675 ImGui::EndDisabled();
676
677 ImGui::EndDisabled();
678 }
679
680 static void drawMeshSettings(vcl::AbstractDrawableMesh& drawable)
681 {
682 using MRI = vcl::MeshRenderInfo;
683
684 ImGui::Separator();
685 // mesh settings
686 const auto settings = drawable.renderSettings();
687 auto newSettings = settings;
688
689 // points
691 if (ImGui::BeginTabBar("MyTabBar", tab_bar_flags)) {
692 // points
693 if (newSettings.canPoints(MRI::Points::VISIBLE) &&
694 ImGui::BeginTabItem("Points")) {
695 drawMeshPointSettings(drawable, newSettings);
696 ImGui::EndTabItem();
697 }
698
699 // surface + wireframe
700 if (newSettings.canSurface(MRI::Surface::VISIBLE)) {
701 if (ImGui::BeginTabItem("Surface")) {
702 drawMeshSurfaceSettings(drawable, newSettings);
703 ImGui::EndTabItem();
704 }
705 if (ImGui::BeginTabItem("Wireframe")) {
706 drawMeshWireframeSettings(drawable, newSettings);
707 ImGui::EndTabItem();
708 }
709 }
710
711 // edges
712 if (newSettings.canEdges(MRI::Edges::VISIBLE) &&
713 ImGui::BeginTabItem("Edges")) {
714 drawMeshEdgeSettings(drawable, newSettings);
715 ImGui::EndTabItem();
716 }
717
718 ImGui::EndTabBar();
719 }
720
721 if (newSettings != settings) {
722 drawable.setRenderSettings(newSettings);
723 }
724 }
725};
726
727} // namespace vcl::imgui
728
729#endif // VCL_IMGUI_MESH_VIEWER_IMGUI_DRAWER_H
The AbstractDrawableMesh class is the base class for all the drawable meshes in the VCLib render syst...
Definition abstract_drawable_mesh.h:41
A class representing a box in N-dimensional space.
Definition box.h:46
The Color class represents a 32 bit color.
Definition color.h:48
The MeshRenderInfo class is a collection of rendering settings for a Mesh.
Definition mesh_render_info.h:61
Wireframe
List of possible settings for the wireframe primitive.
Definition mesh_render_info.h:165
Surface
List of possible settings for the surface primitive.
Definition mesh_render_info.h:147
Edges
List of possible settings for the edges primitive.
Definition mesh_render_info.h:179
Points
List of possible settings for the points primitive.
Definition mesh_render_info.h:130
The MeshRenderSettings class allows an easy management of render settings of a Mesh....
Definition mesh_render_settings.h:70
bool isPoints(MeshRenderInfo::Points p) const
Returns whether the given points option is set.
Definition mesh_render_settings.h:225
bool canWireframe(MeshRenderInfo::Wireframe w) const
Returns the capability of a given option for the wireframe primitive.
Definition mesh_render_settings.h:177
bool setSurface(MeshRenderInfo::Surface s, bool b=true)
Sets the given shading option of the surface.
Definition mesh_render_settings.h:458
bool setEdges(MeshRenderInfo::Edges e, bool b=true)
Sets the given shading option of the edges.
Definition mesh_render_settings.h:568
bool setPoints(MeshRenderInfo::Points p, bool b=true)
Sets the given shading option of the points.
Definition mesh_render_settings.h:397
bool canSurface(MeshRenderInfo::Surface s) const
Returns the capability of a given option for the surface primitive.
Definition mesh_render_settings.h:165
bool canPoints(MeshRenderInfo::Points p) const
Returns the capability of a given option for the points primitive.
Definition mesh_render_settings.h:153
bool canEdges(MeshRenderInfo::Edges e) const
Returns the capability of a given option for the edges primitive.
Definition mesh_render_settings.h:188
bool isSurface(MeshRenderInfo::Surface s) const
Returns whether the given surface option is set.
Definition mesh_render_settings.h:250
bool isWireframe(MeshRenderInfo::Wireframe w) const
Returns whether the given wireframe option is set.
Definition mesh_render_settings.h:270
bool setWireframe(MeshRenderInfo::Wireframe w, bool b=true)
Sets the given shading option of the wireframe.
Definition mesh_render_settings.h:507
bool isEdges(MeshRenderInfo::Edges e) const
Returns whether the given edges option is set.
Definition mesh_render_settings.h:295
Definition mesh_viewer_imgui_drawer.h:42
constexpr uint UINT_NULL
The UINT_NULL value represent a null value of uint that is the maximum value that can be represented ...
Definition base.h:48