Visual Computing Library
Loading...
Searching...
No Matches
vcl::HasFaces Concept Reference

HasFaces concepts is satisfied when at least one of its template types is (or inherits from) a vcl::mesh::FaceContainer. It can be used both to check if a Mesh has faces, or if in a list of types there is a FaceContainer. More...

#include <vclib/concepts/mesh/containers/face_container.h>

Concept definition

template<typename... Args>
HasFaces concepts is satisfied when at least one of its template types is (or inherits from) a vcl::m...
Definition face_container.h:133
The HasFaceContainer concept is satisfied only if a container class provides the types and member fun...
Definition face_container.h:44

Detailed Description

HasFaces concepts is satisfied when at least one of its template types is (or inherits from) a vcl::mesh::FaceContainer. It can be used both to check if a Mesh has faces, or if in a list of types there is a FaceContainer.

In the following example, a MyMesh type can be instantiated only if one of its template Args is a FaceContainer:

template <typename... Args> requires HasFaces<Args...>
class MyMesh {
// ...
};
// ...
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43

To check if a type has (inherits from) FaceContainer:

if constexpr (vcl::HasFaces<MyMeshType>) {
// ...
}
Note
This concept does not check if a Mesh is a valid FaceMesh. To do that, use the vcl::FaceMeshConcept.