Visual Computing Library
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
29#include <vclib/concepts/mesh.h>
30#include <vclib/exceptions/mesh.h>
31
40namespace vcl {
41
42/*************************
43 * is/enableIf functions *
44 *************************/
45
57template<FaceMeshConcept MeshType>
58bool isFaceContainerCompact(const MeshType& m)
59{
61}
62
63// Face AdjacentEdges
64
91template<FaceMeshConcept MeshType>
97
116template<FaceMeshConcept MeshType>
118{
120 ElemId::FACE,
121 CompId::ADJACENT_EDGES>(m);
122}
123
124// Face AdjacentFaces
125
152template<FaceMeshConcept MeshType>
158
177template<FaceMeshConcept MeshType>
179{
181 ElemId::FACE,
182 CompId::ADJACENT_FACES>(m);
183}
184
185// Face Color
186
213template<FaceMeshConcept MeshType>
218
237template<FaceMeshConcept MeshType>
242
243// Face Mark
244
271template<FaceMeshConcept MeshType>
276
295template<FaceMeshConcept MeshType>
300
301// Face Normal
302
329template<FaceMeshConcept MeshType>
334
353template<FaceMeshConcept MeshType>
358
359// Face PrincipalCurvature
360
388template<FaceMeshConcept MeshType>
390{
392 ElemId::FACE,
393 CompId::PRINCIPAL_CURVATURE>(m);
394}
395
414template<FaceMeshConcept MeshType>
416{
418 ElemId::FACE,
419 CompId::PRINCIPAL_CURVATURE>(m);
420}
421
422// Face Quality
423
450template<FaceMeshConcept MeshType>
455
474template<FaceMeshConcept MeshType>
480
481// Face WedgeColors
482
509template<FaceMeshConcept MeshType>
515
534template<FaceMeshConcept MeshType>
536{
538 ElemId::FACE,
539 CompId::WEDGE_COLORS>(m);
540}
541
542// Face WedgeTexCoords
543
570template<FaceMeshConcept MeshType>
572{
574 ElemId::FACE,
575 CompId::WEDGE_TEX_COORDS>(m);
576}
577
596template<FaceMeshConcept MeshType>
598{
600 ElemId::FACE,
601 CompId::WEDGE_TEX_COORDS>(m);
602}
603
604/*********************
605 * require functions *
606 *********************/
607
626template<FaceMeshConcept MeshType>
631
632// Face AdjacentEdges
633
661template<FaceMeshConcept MeshType>
667
668// Face AdjacentFaces
669
697template<FaceMeshConcept MeshType>
703
704// Face Color
705
733template<FaceMeshConcept MeshType>
738
739// Face Mark
740
768template<FaceMeshConcept MeshType>
773
774// Face Normal
775
803template<FaceMeshConcept MeshType>
808
809// Face PrincipalCurvature
810
838template<FaceMeshConcept MeshType>
844
845// Face Quality
846
874template<FaceMeshConcept MeshType>
880
881// Face WedgeColors
882
910template<FaceMeshConcept MeshType>
916
917// Face WedgeTexCoords
918
946template<FaceMeshConcept MeshType>
952
953} // namespace vcl
954
955#endif // VCL_MESH_REQUIREMENTS_FACE_REQUIREMENTS_H
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Concept that checks if a Mesh has the per Face AdjacentEdges component.
Definition per_face.h:63
Concept that checks if a Mesh has the per Face AdjacentFaces component.
Definition per_face.h:79
Concept that checks if a Mesh has the per Face Color component.
Definition per_face.h:111
Concept that checks if a Mesh has the per Face Mark component.
Definition per_face.h:143
Concept that checks if a Mesh has the per Face Normal component.
Definition per_face.h:158
Concept that checks if a Mesh has the per Face PrincipalCurvature component.
Definition per_face.h:190
Concept that checks if a Mesh has the per Face Quality component.
Definition per_face.h:206
Concept that checks if a Mesh has the per Face WedgeColors component.
Definition per_face.h:254
Concept that checks if a Mesh has the per Face WedgeTexCoords component.
Definition per_face.h:270
bool enableIfPerFaceQualityOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a Quality Component,...
Definition face_requirements.h:475
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:296
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:92
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:153
bool enableIfPerFaceWedgeTexCoordsOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a WedgeTexCoords Component,...
Definition face_requirements.h:597
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:571
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:330
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:451
void requirePerFaceQuality(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Quality Component,...
Definition face_requirements.h:875
bool enableIfPerFacePrincipalCurvatureOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a PrincipalCurvature Component,...
Definition face_requirements.h:415
void requirePerFaceWedgeTexCoords(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a WedgeTexCoords Component,...
Definition face_requirements.h:947
void requirePerFaceAdjacentEdges(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a AdjacentEdges Component,...
Definition face_requirements.h:662
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:510
void requirePerFacePrincipalCurvature(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a PrincipalCurvature Component,...
Definition face_requirements.h:839
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:272
void requireFaceContainerCompactness(const MeshType &m)
This function asserts that a Mesh has the FaceContainer compact (no elements flagged as deleted).
Definition face_requirements.h:627
bool enableIfPerFaceAdjacentEdgesOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a AdjacentEdges Component,...
Definition face_requirements.h:117
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:214
void requirePerFaceNormal(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Normal Component,...
Definition face_requirements.h:804
void requirePerFaceMark(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Mark Component,...
Definition face_requirements.h:769
bool isFaceContainerCompact(const MeshType &m)
Returns true if the given mesh has its FaceContainer compact.
Definition face_requirements.h:58
bool enableIfPerFaceAdjacentFacesOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a AdjacentFaces Component,...
Definition face_requirements.h:178
void requirePerFaceColor(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a Color Component,...
Definition face_requirements.h:734
void requirePerFaceWedgeColors(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a WedgeColors Component,...
Definition face_requirements.h:911
bool enableIfPerFaceNormalOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a Normal Component,...
Definition face_requirements.h:354
bool enableIfPerFaceWedgeColorsOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a WedgeColors Component,...
Definition face_requirements.h:535
bool enableIfPerFaceColorOptional(MeshType &m)
If the input mesh has a FaceContainer, and the Face Element has a Color Component,...
Definition face_requirements.h:238
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:389
void requirePerFaceAdjacentFaces(const MeshType &m)
This function asserts that a Mesh has a FaceContainer, the Face has a AdjacentFaces Component,...
Definition face_requirements.h:698
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