Visual Computing Library  devel
Loading...
Searching...
No Matches
face_requirements.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_MESH_REQUIREMENTS_FACE_REQUIREMENTS_H
24#define VCL_MESH_REQUIREMENTS_FACE_REQUIREMENTS_H
25
26#include "../containers/face_container.h"
27#include "element_requirements.h"
28
45namespace vcl {
46
47/************
48 * concepts *
49 ************/
50
51template<typename MeshType>
52concept HasTriangles =
53 HasFaces<MeshType> && RemoveRef<MeshType>::FaceType::VERTEX_NUMBER == 3;
54
55template<typename MeshType>
56concept HasQuads =
57 HasFaces<MeshType> && RemoveRef<MeshType>::FaceType::VERTEX_NUMBER == 4;
58
59template<typename MeshType>
60concept HasPolygons =
61 HasFaces<MeshType> && RemoveRef<MeshType>::FaceType::VERTEX_NUMBER == -1;
62
69template<typename T>
71
72template<typename T>
74
75template<typename T>
77
78template<typename T>
80
92template<typename MeshType>
96
108template<typename MeshType>
112
124template<typename MeshType>
128
140template<typename MeshType>
144
156template<typename MeshType>
160
172template<typename MeshType>
175
187template<typename MeshType>
191
203template<typename MeshType>
207
219template<typename MeshType>
223
235template<typename MeshType>
239
251template<typename MeshType>
255
267template<typename MeshType>
271
283template<typename MeshType>
287
299template<typename MeshType>
303
304/*************************
305 * is/enableIf functions *
306 *************************/
307
319template<FaceMeshConcept MeshType>
320bool isFaceContainerCompact(const MeshType& m)
321{
323}
324
325// Face AdjacentEdges
326
353template<FaceMeshConcept MeshType>
359
378template<FaceMeshConcept MeshType>
380{
382 ElemId::FACE,
383 CompId::ADJACENT_EDGES>(m);
384}
385
386// Face AdjacentFaces
387
414template<FaceMeshConcept MeshType>
420
439template<FaceMeshConcept MeshType>
441{
443 ElemId::FACE,
444 CompId::ADJACENT_FACES>(m);
445}
446
447// Face Color
448
475template<FaceMeshConcept MeshType>
480
499template<FaceMeshConcept MeshType>
504
505// Face Mark
506
533template<FaceMeshConcept MeshType>
538
557template<FaceMeshConcept MeshType>
562
563// Face Normal
564
591template<FaceMeshConcept MeshType>
596
615template<FaceMeshConcept MeshType>
620
621// Face PrincipalCurvature
622
650template<FaceMeshConcept MeshType>
652{
654 ElemId::FACE,
655 CompId::PRINCIPAL_CURVATURE>(m);
656}
657
676template<FaceMeshConcept MeshType>
678{
680 ElemId::FACE,
681 CompId::PRINCIPAL_CURVATURE>(m);
682}
683
684// Face Quality
685
712template<FaceMeshConcept MeshType>
717
736template<FaceMeshConcept MeshType>
742
743// Face WedgeColors
744
771template<FaceMeshConcept MeshType>
777
796template<FaceMeshConcept MeshType>
798{
800 ElemId::FACE,
801 CompId::WEDGE_COLORS>(m);
802}
803
804// Face WedgeTexCoords
805
832template<FaceMeshConcept MeshType>
834{
836 ElemId::FACE,
837 CompId::WEDGE_TEX_COORDS>(m);
838}
839
858template<FaceMeshConcept MeshType>
860{
862 ElemId::FACE,
863 CompId::WEDGE_TEX_COORDS>(m);
864}
865
866/*********************
867 * require functions *
868 *********************/
869
888template<FaceMeshConcept MeshType>
893
894// Face AdjacentEdges
895
923template<FaceMeshConcept MeshType>
929
930// Face AdjacentFaces
931
959template<FaceMeshConcept MeshType>
965
966// Face Color
967
995template<FaceMeshConcept MeshType>
1000
1001// Face Mark
1002
1030template<FaceMeshConcept MeshType>
1035
1036// Face Normal
1037
1065template<FaceMeshConcept MeshType>
1070
1071// Face PrincipalCurvature
1072
1100template<FaceMeshConcept MeshType>
1106
1107// Face Quality
1108
1136template<FaceMeshConcept MeshType>
1142
1143// Face WedgeColors
1144
1172template<FaceMeshConcept MeshType>
1178
1179// Face WedgeTexCoords
1180
1208template<FaceMeshConcept MeshType>
1214
1215} // namespace vcl
1216
1217#endif // VCL_MESH_REQUIREMENTS_FACE_REQUIREMENTS_H
A class representing a box in N-dimensional space.
Definition box.h:46
The FaceMeshConcept is evaluated true if the type T is a Mesh (it satisfies the vcl::MeshConcept) and...
Definition face_requirements.h:70
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 Face AdjacentEdges component.
Definition face_requirements.h:93
Concept that checks if a Mesh has the per Face AdjacentFaces component.
Definition face_requirements.h:109
Concept that checks if a Mesh has the per Face BitFlags component.
Definition face_requirements.h:125
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 CustomComponents component.
Definition face_requirements.h:157
Concept that checks if a Mesh has the per Face Mark component.
Definition face_requirements.h:173
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 PolygonBitFlags component.
Definition face_requirements.h:204
Concept that checks if a Mesh has the per Face PrincipalCurvature component.
Definition face_requirements.h:220
Concept that checks if a Mesh has the per Face Quality component.
Definition face_requirements.h:236
Concept that checks if a Mesh has the per Face TriangleBitFlags component.
Definition face_requirements.h:252
Concept that checks if a Mesh has the per Face VertexPointers component.
Definition face_requirements.h:268
Concept that checks if a Mesh has the per Face WedgeColors component.
Definition face_requirements.h:284
Concept that checks if a Mesh has the per Face WedgeTexCoords component.
Definition face_requirements.h:300
Definition face_requirements.h:60
Definition face_requirements.h:56
Definition face_requirements.h:52
A concept that checks whether a class is (inherits from) a Mesh class.
Definition mesh.h:2167
Definition face_requirements.h:79
Definition face_requirements.h:76
Definition face_requirements.h:73
Definition face_components.h:68
Definition face_components.h:72
Definition face_components.h:76
Definition face_components.h:78
Definition face_components.h:82
Definition face_components.h:86
Definition face_components.h:90
Definition face_components.h:94
Definition face_components.h:96
Definition face_components.h:100
Definition face_components.h:104
Definition face_components.h:106
Definition face_components.h:108
Definition face_components.h:112
A concept that checks whether a class has (inherits from) an FaceContainer class.
Definition face_container.h:1349
bool enableIfPerFaceQualityOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a Quality Component,...
Definition face_requirements.h:737
bool enableIfPerFaceMarkOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a Mark Component, this function enabl...
Definition face_requirements.h:558
bool isPerFaceAdjacentEdgesAvailable(const MeshType &m)
Returns true if the AdjacentEdges component is available (enabled) in the Face element of the input m...
Definition face_requirements.h:354
bool isPerFaceAdjacentFacesAvailable(const MeshType &m)
Returns true if the AdjacentFaces component is available (enabled) in the Face element of the input m...
Definition face_requirements.h:415
bool enableIfPerFaceWedgeTexCoordsOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a WedgeTexCoords Component,...
Definition face_requirements.h:859
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 isPerFaceQualityAvailable(const MeshType &m)
Returns true if the Quality component is available (enabled) in the Face element of the input mesh m.
Definition face_requirements.h:713
void requirePerFaceQuality(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Quality Component,...
Definition face_requirements.h:1137
bool enableIfPerFacePrincipalCurvatureOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a PrincipalCurvature Component,...
Definition face_requirements.h:677
void requirePerFaceWedgeTexCoords(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a WedgeTexCoords Component,...
Definition face_requirements.h:1209
void requirePerFaceAdjacentEdges(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a AdjacentEdges Component,...
Definition face_requirements.h:924
bool isPerFaceWedgeColorsAvailable(const MeshType &m)
Returns true if the WedgeColors component is available (enabled) in the Face element of the input mes...
Definition face_requirements.h:772
void requirePerFacePrincipalCurvature(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a PrincipalCurvature Component,...
Definition face_requirements.h:1101
bool isPerFaceMarkAvailable(const MeshType &m)
Returns true if the Mark component is available (enabled) in the Face element of the input mesh m.
Definition face_requirements.h:534
void requireFaceContainerCompactness(const MeshType &m)
This function asserts that a Mesh has the FaceContainer compact (no elements flagged as deleted).
Definition face_requirements.h:889
bool enableIfPerFaceAdjacentEdgesOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a AdjacentEdges Component,...
Definition face_requirements.h:379
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
void requirePerFaceNormal(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Normal Component,...
Definition face_requirements.h:1066
void requirePerFaceMark(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Mark Component,...
Definition face_requirements.h:1031
bool isFaceContainerCompact(const MeshType &m)
Returns true if the given mesh has its FaceContainer compact.
Definition face_requirements.h:320
bool enableIfPerFaceAdjacentFacesOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a AdjacentFaces Component,...
Definition face_requirements.h:440
void requirePerFaceColor(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Color Component,...
Definition face_requirements.h:996
void requirePerFaceWedgeColors(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a WedgeColors Component,...
Definition face_requirements.h:1173
bool enableIfPerFaceNormalOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a Normal Component,...
Definition face_requirements.h:616
bool enableIfPerFaceWedgeColorsOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a WedgeColors Component,...
Definition face_requirements.h:797
bool enableIfPerFaceColorOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a Color Component,...
Definition face_requirements.h:500
bool isPerFacePrincipalCurvatureAvailable(const MeshType &m)
Returns true if the PrincipalCurvature component is available (enabled) in the Face element of the in...
Definition face_requirements.h:651
void requirePerFaceAdjacentFaces(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a AdjacentFaces Component,...
Definition face_requirements.h:960
bool isPerElementComponentAvailable(const MeshType &m)
Returns true if the given component is available in the given element of the input mesh m.
Definition element_requirements.h:82
bool enableIfPerElementComponentOptional(MeshType &m)
Makes available the given Component in the given Element of the input mesh m, and returns true if it ...
Definition element_requirements.h:120