Visual Computing Library  devel
Loading...
Searching...
No Matches
mesh_render_settings.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_RENDER_DRAWABLE_MESH_MESH_RENDER_SETTINGS_H
24#define VCL_RENDER_DRAWABLE_MESH_MESH_RENDER_SETTINGS_H
25
26#include "mesh_render_info.h"
27
28#include <vclib/mesh.h>
29#include <vclib/space/core.h>
30
31namespace vcl {
32
70{
71 using MRI = MeshRenderInfo;
72
73 MeshRenderInfo mCapability; // capabilities of the mesh
74 MeshRenderInfo mDrawMode; // current rendering settings
75
76 float mPointWidth = 3;
77 float mPointUserColor[4] = {1, 1, 0, 1}; // TODO: change to uint?
78 uint mSurfUserColor = 0xFF808080; // abgr
79 int mWrfWidth = 1;
80 float mWrfUserColor[4] = {0, 0, 0, 1}; // TODO: change to uint?
81 int mEdgesWidth = 1;
82 uint mEdgesUserColor = 0xFF000000; // abgr
83
84public:
93 MeshRenderSettings() = default;
94
104 template<MeshConcept MeshType>
105 MeshRenderSettings(const MeshType& m)
106 {
107 setRenderCapabilityFrom(m);
108 setDefaultSettingsFromCapability();
109 }
110
115 MeshRenderInfo drawMode() const { return mDrawMode; }
116
117 bool operator==(const MeshRenderSettings&) const = default;
118
119 bool operator!=(const MeshRenderSettings&) const = default;
120
121 // rendering option capabilities of the mesh
122
127 bool canBeVisible() const { return mCapability.visible(); }
128
140 template<MeshRenderInfo::Primitive PRIMITIVE, typename Enum>
141 bool can(Enum val) const
142 {
143 assert(val < Enum::COUNT);
144 return mCapability.settings<PRIMITIVE>()[toUnderlying(val)];
145 }
146
154 {
156 }
157
166 {
168 }
169
181
189 {
191 }
192
193 // rendering option getters
194
199 bool isVisible() const { return mDrawMode.visible(); }
200
212 template<MeshRenderInfo::Primitive PRIMITIVE, typename Enum>
213 bool is(Enum val) const
214 {
215 assert(val < Enum::COUNT);
216 return mDrawMode.settings<PRIMITIVE>()[toUnderlying(val)];
217 }
218
226 {
228 }
229
230 float pointWidth() const { return mPointWidth; }
231
232 vcl::Color pointUserColor() const
233 {
234 vcl::Color c;
235 c.setRedF(mPointUserColor[0]);
236 c.setGreenF(mPointUserColor[1]);
237 c.setBlueF(mPointUserColor[2]);
238 c.setAlphaF(mPointUserColor[3]);
239 return c;
240 }
241
242 const float* pointUserColorData() const { return mPointUserColor; }
243
251 {
253 }
254
255 vcl::Color surfaceUserColor() const
256 {
257 vcl::Color c;
258 c.setAbgr(mSurfUserColor);
259 return c;
260 }
261
262 const uint* surfaceUserColorData() const { return &mSurfUserColor; }
263
274
275 int wireframeWidth() const { return mWrfWidth; }
276
277 vcl::Color wireframeUserColor() const
278 {
279 vcl::Color c;
280 c.setRedF(mWrfUserColor[0]);
281 c.setGreenF(mWrfUserColor[1]);
282 c.setBlueF(mWrfUserColor[2]);
283 c.setAlphaF(mWrfUserColor[3]);
284 return c;
285 }
286
287 const float* wireframeUserColorData() const { return mWrfUserColor; }
288
296 {
298 }
299
300 int edgesWidth() const { return mEdgesWidth; }
301
302 vcl::Color edgesUserColor() const
303 {
304 vcl::Color c;
305 c.setAbgr(mEdgesUserColor);
306 return c;
307 }
308
309 const uint* edgesUserColorData() const { return &mEdgesUserColor; }
310
311 // rendering option setters
312
321 bool setVisibility(bool b)
322 {
323 if (canBeVisible()) {
324 mDrawMode.visible() = b;
325 return true;
326 }
327 else {
328 return false;
329 }
330 }
331
354 template<MeshRenderInfo::Primitive PRIMITIVE, typename Enum>
355 bool set(Enum val, bool b = true)
356 {
357 if (can<PRIMITIVE>(val)) { // if the capability allows it
358 // get the range of the mutual exclusive settings for val
359 auto rng = MRI::exclusiveRange<PRIMITIVE>(val);
360 // if there are no mutual exclusive settings
361 if (rng.first == rng.second) {
362 // the setting could be true or false
363 // e.g. VISIBLE
364 mDrawMode.settings<PRIMITIVE>()[rng.first] = b;
365 }
366 else {
367 // only one setting in the range can be true
368 // e.g. the range SHADING_*
369 for (auto i = rng.first; i <= rng.second; ++i) {
370 mDrawMode.settings<PRIMITIVE>()[i] = toUnderlying(val) == i;
371 }
372 }
373 return true;
374 }
375 else {
376 return false;
377 }
378 }
379
398 {
400 }
401
402 bool setPointsWidth(float width)
403 {
404 if (canPoints(MRI::Points::VISIBLE)) {
405 mPointWidth = width;
406 return true;
407 }
408 else {
409 return false;
410 }
411 }
412
413 bool setPointsUserColor(float r, float g, float b, float a = 1)
414 {
415 if (canPoints(MRI::Points::VISIBLE)) {
416 mPointUserColor[0] = r;
417 mPointUserColor[1] = g;
418 mPointUserColor[2] = b;
419 mPointUserColor[3] = a;
420 return true;
421 }
422 else {
423 return false;
424 }
425 }
426
427 bool setPointsUserColor(const vcl::Color& c)
428 {
429 if (canPoints(MRI::Points::VISIBLE)) {
430 mPointUserColor[0] = c.redF();
431 mPointUserColor[1] = c.greenF();
432 mPointUserColor[2] = c.blueF();
433 mPointUserColor[3] = c.alphaF();
434 return true;
435 }
436 else {
437 return false;
438 }
439 }
440
459 {
461 }
462
463 bool setSurfaceUserColor(float r, float g, float b, float a = 1)
464 {
465 if (canSurface(MRI::Surface::VISIBLE)) {
466 vcl::Color c;
467 c.setRedF(r);
468 c.setGreenF(g);
469 c.setBlueF(b);
470 c.setAlphaF(a);
471 mSurfUserColor = c.abgr();
472 return true;
473 }
474 else {
475 return false;
476 }
477 }
478
479 bool setSurfaceUserColor(const vcl::Color& c)
480 {
481 if (canSurface(MRI::Surface::VISIBLE)) {
482 mSurfUserColor = c.abgr();
483 return true;
484 }
485 else {
486 return false;
487 }
488 }
489
508 {
510 }
511
512 bool setWireframeUserColor(float r, float g, float b, float a = 1)
513 {
514 if (canWireframe(MRI::Wireframe::VISIBLE)) {
515 mWrfUserColor[0] = r;
516 mWrfUserColor[1] = g;
517 mWrfUserColor[2] = b;
518 mWrfUserColor[3] = a;
519 return true;
520 }
521 else {
522 return false;
523 }
524 }
525
526 bool setWireframeUserColor(const vcl::Color& c)
527 {
528 if (canWireframe(MRI::Wireframe::VISIBLE)) {
529 mWrfUserColor[0] = c.redF();
530 mWrfUserColor[1] = c.greenF();
531 mWrfUserColor[2] = c.blueF();
532 mWrfUserColor[3] = c.alphaF();
533 return true;
534 }
535 else {
536 return false;
537 }
538 }
539
540 bool setWireframeWidth(int width)
541 {
542 if (canWireframe(MRI::Wireframe::VISIBLE)) {
543 mWrfWidth = width;
544 return true;
545 }
546 else {
547 return false;
548 }
549 }
550
568 bool setEdges(MeshRenderInfo::Edges e, bool b = true)
569 {
570 return set<MRI::Primitive::EDGES>(e, b);
571 }
572
573 bool setEdgesUserColor(float r, float g, float b, float a = 1)
574 {
575 if (canEdges(MRI::Edges::VISIBLE)) {
576 vcl::Color c;
577 c.setRedF(r);
578 c.setGreenF(g);
579 c.setBlueF(b);
580 c.setAlphaF(a);
581 mEdgesUserColor = c.abgr();
582 return true;
583 }
584 else {
585 return false;
586 }
587 }
588
589 bool setEdgesUserColor(const vcl::Color& c)
590 {
591 if (canEdges(MRI::Edges::VISIBLE)) {
592 mEdgesUserColor = c.abgr();
593 return true;
594 }
595 else {
596 return false;
597 }
598 }
599
600 bool setEdgesWidth(int width)
601 {
602 if (canEdges(MRI::Edges::VISIBLE)) {
603 mEdgesWidth = width;
604 return true;
605 }
606 else {
607 return false;
608 }
609 }
610
611 template<MeshConcept MeshType>
612 void setRenderCapabilityFrom(const MeshType& m)
613 {
614 mCapability.reset();
615
616 if (m.vertexNumber() > 0) {
617 mCapability.visible() = true;
618
619 // -- Points --
620 setPointsCapability(MRI::Points::VISIBLE);
621 setPointsCapability(MRI::Points::SHAPE_PIXEL);
622 setPointsCapability(MRI::Points::SHAPE_CIRCLE);
623 setPointsCapability(MRI::Points::SHAPE_SPHERE);
624 setPointsCapability(MRI::Points::SHADING_NONE);
625 setPointsCapability(MRI::Points::COLOR_USER);
626
627 if constexpr (vcl::HasPerVertexNormal<MeshType>) {
628 if (vcl::isPerVertexNormalAvailable(m)) {
629 setPointsCapability(MRI::Points::SHADING_VERT);
630 }
631 }
632
633 if constexpr (vcl::HasPerVertexColor<MeshType>) {
634 if (vcl::isPerVertexColorAvailable(m)) {
635 setPointsCapability(MRI::Points::COLOR_VERTEX);
636 }
637 }
638
639 if constexpr (vcl::HasColor<MeshType>) {
640 setPointsCapability(MRI::Points::COLOR_MESH);
641 }
642
643 // -- Surface and Wireframe --
644 if constexpr (vcl::HasFaces<MeshType>) {
645 if (m.faceNumber() > 0) {
646 setSurfaceCapability(MRI::Surface::VISIBLE);
647 setSurfaceCapability(MRI::Surface::SHADING_NONE);
648 setSurfaceCapability(MRI::Surface::COLOR_USER);
649 setWireframeCapability(MRI::Wireframe::VISIBLE);
650 setWireframeCapability(MRI::Wireframe::SHADING_NONE);
651 setWireframeCapability(MRI::Wireframe::COLOR_USER);
652
653 if constexpr (vcl::HasColor<MeshType>) {
654 setSurfaceCapability(MRI::Surface::COLOR_MESH);
655 setWireframeCapability(MRI::Wireframe::COLOR_MESH);
656 }
657
658 if constexpr (vcl::HasPerFaceNormal<MeshType>) {
660 setSurfaceCapability(MRI::Surface::SHADING_FLAT);
661 }
662 }
663
664 if constexpr (vcl::HasPerVertexNormal<MeshType>) {
665 if (vcl::isPerVertexNormalAvailable(m)) {
666 setSurfaceCapability(MRI::Surface::SHADING_SMOOTH);
667 setWireframeCapability(
668 MRI::Wireframe::SHADING_VERT);
669 }
670 }
671
672 if constexpr (vcl::HasPerFaceColor<MeshType>) {
674 setSurfaceCapability(MRI::Surface::COLOR_FACE);
675 }
676
677 if constexpr (vcl::HasPerVertexColor<MeshType>) {
678 if (vcl::isPerVertexColorAvailable(m)) {
679 setSurfaceCapability(MRI::Surface::COLOR_VERTEX);
680 setWireframeCapability(
681 MRI::Wireframe::COLOR_VERTEX);
682 }
683 }
684
685 if constexpr (vcl::HasTexturePaths<MeshType>) {
687 if (vcl::isPerVertexTexCoordAvailable(m) &&
688 m.textureNumber() > 0)
689 setSurfaceCapability(
690 MRI::Surface::COLOR_VERTEX_TEX);
691 }
692
695 m.textureNumber() > 0)
696 setSurfaceCapability(
697 MRI::Surface::COLOR_WEDGE_TEX);
698 }
699 }
700 }
701 }
702
703 // -- Edges --
704 if constexpr (vcl::HasEdges<MeshType>) {
705 if (m.edgeNumber() > 0) {
706 setEdgesCapability(MRI::Edges::VISIBLE);
707 setEdgesCapability(MRI::Edges::SHADING_NONE);
708 setEdgesCapability(MRI::Edges::COLOR_USER);
709
710 if constexpr (vcl::HasColor<MeshType>) {
711 setEdgesCapability(MRI::Edges::COLOR_MESH);
712 }
713
714 if constexpr (vcl::HasPerVertexNormal<MeshType>) {
715 if (vcl::isPerVertexNormalAvailable(m)) {
716 setEdgesCapability(MRI::Edges::SHADING_SMOOTH);
717 }
718 }
719
720 if constexpr (vcl::HasPerEdgeNormal<MeshType>) {
722 setEdgesCapability(MRI::Edges::SHADING_FLAT);
723 }
724 }
725
726 if constexpr (vcl::HasPerEdgeColor<MeshType>) {
728 setEdgesCapability(MRI::Edges::COLOR_EDGE);
729 }
730
731 if constexpr (vcl::HasPerVertexColor<MeshType>) {
732 if (vcl::isPerVertexColorAvailable(m)) {
733 setEdgesCapability(MRI::Edges::COLOR_VERTEX);
734 }
735 }
736 }
737 }
738 }
739
740 // make sure that the previous draw mode satisfies the new capabilites
741 mDrawMode &= mCapability;
742 }
743
744 void setDefaultSettingsFromCapability()
745 {
746 mDrawMode.reset();
747
748 if (canBeVisible()) {
749 setVisibility(true);
750
751 setDefaultSurfaceSettingsFromCapability();
752 setDefaultWireframeSettingsFromCapability();
753 setDefaultPointSettingsFromCapability();
754 setDefaultEdgeSettingsFromCapability();
755 }
756 }
757
758private:
759 template<MeshRenderInfo::Primitive PRIMITIVE, typename Enum>
760 void setCapability(Enum val, bool b = true)
761 {
762 assert(val < Enum::COUNT);
763 mCapability.settings<PRIMITIVE>()[toUnderlying(val)] = b;
764 }
765
766 void setPointsCapability(MeshRenderInfo::Points p, bool b = true)
767 {
768 setCapability<MRI::Primitive::POINTS>(p, b);
769 }
770
771 void setSurfaceCapability(MeshRenderInfo::Surface s, bool b = true)
772 {
773 setCapability<MRI::Primitive::SURFACE>(s, b);
774 }
775
776 void setWireframeCapability(MeshRenderInfo::Wireframe w, bool b = true)
777 {
778 setCapability<MRI::Primitive::WIREFRAME>(w, b);
779 }
780
781 void setEdgesCapability(MeshRenderInfo::Edges e, bool b = true)
782 {
783 setCapability<MRI::Primitive::EDGES>(e, b);
784 }
785
786 void setDefaultPointSettingsFromCapability()
787 {
788 using enum MRI::Points;
789
790 mDrawMode.points().reset();
791
792 if (canPoints(VISIBLE)) {
793 if (!canSurface(MRI::Surface::VISIBLE))
794 setPoints(VISIBLE, true);
795 setPoints(SHADING_NONE);
796 setPoints(SHAPE_PIXEL);
797 if (canPoints(SHADING_VERT)) {
798 setPoints(SHADING_VERT);
799 }
800 if (canPoints(COLOR_VERTEX)) {
801 setPoints(COLOR_VERTEX);
802 }
803 else {
804 setPoints(COLOR_USER);
805 }
806 }
807 }
808
809 void setDefaultSurfaceSettingsFromCapability()
810 {
811 using enum MRI::Surface;
812
813 mDrawMode.surface().reset();
814
815 if (canSurface(VISIBLE)) {
816 setSurface(VISIBLE, true);
817 // shading
818 if (canSurface(SHADING_SMOOTH)) {
819 setSurface(SHADING_SMOOTH);
820 }
821 else if (canSurface(SHADING_FLAT)) {
822 setSurface(SHADING_FLAT);
823 }
824 else {
825 setSurface(SHADING_NONE);
826 }
827 // color
828 if (canSurface(COLOR_WEDGE_TEX)) {
829 setSurface(COLOR_WEDGE_TEX);
830 }
831 else if (canSurface(COLOR_VERTEX_TEX)) {
832 setSurface(COLOR_VERTEX_TEX);
833 }
834 else if (canSurface(COLOR_VERTEX)) {
835 setSurface(COLOR_VERTEX);
836 }
837 else if (canSurface(COLOR_FACE)) {
838 setSurface(COLOR_FACE);
839 }
840 // jump mesh color on purpose: it is always available on the mesh,
841 // but rarely used and it is likely to be set to 0 (black)
842 else {
843 setSurface(COLOR_USER);
844 }
845 }
846 }
847
848 void setDefaultWireframeSettingsFromCapability()
849 {
850 using enum MRI::Wireframe;
851
852 mDrawMode.wireframe().reset();
853
854 if (canWireframe(VISIBLE)) {
855 if (canWireframe(SHADING_VERT)) {
856 setWireframe(SHADING_VERT);
857 }
858 else {
859 setWireframe(SHADING_NONE);
860 }
861 // wireframe color (defaults to user defined)
862 setWireframe(COLOR_USER);
863 }
864 }
865
866 void setDefaultEdgeSettingsFromCapability()
867 {
868 using enum MRI::Edges;
869
870 mDrawMode.edges().reset();
871
872 if (canEdges(VISIBLE)) {
873 setEdges(VISIBLE, true);
874
875 if (canEdges(SHADING_SMOOTH)) {
876 setEdges(SHADING_SMOOTH);
877 }
878 else if (canEdges(SHADING_FLAT)) {
879 setEdges(SHADING_FLAT);
880 }
881 else {
882 setEdges(SHADING_NONE);
883 }
884
885 if (canEdges(COLOR_VERTEX)) {
886 setEdges(COLOR_VERTEX);
887 }
888 else if (canEdges(COLOR_EDGE)) {
889 setEdges(COLOR_EDGE);
890 }
891 else {
892 setEdges(COLOR_USER);
893 }
894 }
895 }
896};
897
898} // namespace vcl
899
900#endif // VCL_RENDER_DRAWABLE_MESH_MESH_RENDER_SETTINGS_H
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
float greenF() const
Returns the float green component of this color [0-1].
Definition color.h:210
float blueF() const
Returns the float blue component of this color [0-1].
Definition color.h:216
float alphaF() const
Returns the float alpha component of this color [0-1].
Definition color.h:222
void setRedF(float red)
Sets the red of this color [0-1].
Definition color.h:534
float redF() const
Returns the float red component of this color [0-1].
Definition color.h:204
void setAlphaF(float alpha)
Sets the alpha of this color [0-1].
Definition color.h:528
void setBlueF(float blue)
Sets the blue of this color [0-1].
Definition color.h:546
void setGreenF(float green)
Sets the green of this color [0-1].
Definition color.h:540
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
BitSet16 edges() const
Returns the settings for the edges primitive.
Definition mesh_render_info.h:266
BitSet16 surface() const
Returns the settings for the surface primitive.
Definition mesh_render_info.h:242
BitSet16 settings() const
Returns the settings for a given primitive.
Definition mesh_render_info.h:210
BitSet16 points() const
Returns the settings for the points primitive.
Definition mesh_render_info.h:230
Surface
List of possible settings for the surface primitive.
Definition mesh_render_info.h:147
bool visible() const
Returns the visibility status of the mesh.
Definition mesh_render_info.h:196
BitSet16 wireframe() const
Returns the settings for the wireframe primitive.
Definition mesh_render_info.h:254
void reset()
Resets all the settings of the mesh.
Definition mesh_render_info.h:277
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
MeshRenderSettings()=default
Construct a new MeshRenderSettings object with capabilities set to false.
bool isPoints(MeshRenderInfo::Points p) const
Returns whether the given points option is set.
Definition mesh_render_settings.h:225
bool can(Enum val) const
Returns the capability of a given option for the given primitive.
Definition mesh_render_settings.h:141
bool canWireframe(MeshRenderInfo::Wireframe w) const
Returns the capability of a given option for the wireframe primitive.
Definition mesh_render_settings.h:177
MeshRenderSettings(const MeshType &m)
Construct a new MeshRenderSettings object from a Mesh.
Definition mesh_render_settings.h:105
MeshRenderInfo drawMode() const
Returns the current draw mode as a MeshRenderInfo object.
Definition mesh_render_settings.h:115
bool isVisible() const
Returns whether the mesh is visible.
Definition mesh_render_settings.h:199
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 is(Enum val) const
Returns whether the given option for the given primitive is set.
Definition mesh_render_settings.h:213
bool set(Enum val, bool b=true)
Sets given the shading option of the given primitive.
Definition mesh_render_settings.h:355
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 setVisibility(bool b)
Sets the visibility of the mesh.
Definition mesh_render_settings.h:321
bool canPoints(MeshRenderInfo::Points p) const
Returns the capability of a given option for the points primitive.
Definition mesh_render_settings.h:153
bool canBeVisible() const
Returns whether the mesh can be visible.
Definition mesh_render_settings.h:127
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
Concept that is evaluated true if a Mesh has the Color component.
Definition mesh_requirements.h:62
HasEdges concepts is satisfied when at least one of its template types is (or inherits from) a vcl::m...
Definition edge_container.h:1064
HasFaces concepts is satisfied when at least one of its template types is (or inherits from) a vcl::m...
Definition face_container.h:1389
Concept that checks if a Mesh has the per Edge Color component.
Definition edge_requirements.h:118
Concept that checks if a Mesh has the per Edge Normal component.
Definition edge_requirements.h:163
Concept that checks if a Mesh has the per Face Color component.
Definition face_requirements.h:141
Concept that checks if a Mesh has the per Face Normal component.
Definition face_requirements.h:188
Concept that checks if a Mesh has the per Face WedgeTexCoords component.
Definition face_requirements.h:300
Concept that checks if a Mesh has the per Vertex Color component.
Definition vertex_requirements.h:110
Concept that checks if a Mesh has the per Vertex Normal component.
Definition vertex_requirements.h:140
Concept that checks if a Mesh has the per Vertex TexCoord component.
Definition vertex_requirements.h:186
Concept that checks if a Mesh has the TexturePaths component.
Definition mesh_requirements.h:105
bool isPerEdgeColorAvailable(const MeshType &m)
Returns true if the Color component is available (enabled) in the Edge element of the input mesh m.
Definition edge_requirements.h:370
bool isPerEdgeNormalAvailable(const MeshType &m)
Returns true if the Normal component is available (enabled) in the Edge element of the input mesh m.
Definition edge_requirements.h:486
bool isPerFaceWedgeTexCoordsAvailable(const MeshType &m)
Returns true if the WedgeTexCoords component is available (enabled) in the Face element of the input ...
Definition face_requirements.h:833
bool isPerFaceNormalAvailable(const MeshType &m)
Returns true if the Normal component is available (enabled) in the Face element of the input mesh m.
Definition face_requirements.h:592
bool isPerFaceColorAvailable(const MeshType &m)
Returns true if the Color component is available (enabled) in the Face element of the input mesh m.
Definition face_requirements.h:476