23#ifndef VCL_MESH_REQUIREMENTS_MESH_REQUIREMENTS_H
24#define VCL_MESH_REQUIREMENTS_MESH_REQUIREMENTS_H
26#include "face_requirements.h"
28#include <vclib/mesh/mesh.h>
29#include <vclib/mesh/mesh_components.h>
52template<
typename MeshType>
61template<
typename MeshType>
70template<
typename MeshType>
79template<
typename MeshType>
87template<
typename MeshType>
95template<
typename MeshType>
103template<
typename MeshType>
128template<MeshConcept MeshType>
135 using F = MeshType::FaceType;
136 for (
const F& f :
m.faces()) {
137 if (f.vertexNumber() != 3)
164template<MeshConcept MeshType>
171 using F = MeshType::FaceType;
172 for (
const F& f :
m.faces()) {
173 if (f.vertexNumber() != 4)
193template<MeshConcept MeshType>
196 return m.isCompact();
223template<FaceMeshConcept MeshType>
227 for (
const auto& f :
m.faces()) {
228 if (f.vertexNumber() != 3) {
230 "Triangle Mesh Required.");
256template<FaceMeshConcept MeshType>
260 for (
const auto& f :
m.faces()) {
261 if (f.vertexNumber() != 4) {
280template<MeshConcept MeshType>
A class representing a box in N-dimensional space.
Definition box.h:46
Exception thrown when the mesh is not compact.
Definition exceptions.h:84
Exception thrown when an input/output mesh is not composed of quads.
Definition exceptions.h:154
Exception thrown when an input/output mesh is not composed of triangles.
Definition exceptions.h:131
Concept that is evaluated true if a Mesh has the BoundingBox component.
Definition mesh_requirements.h:53
Concept that is evaluated true if a Mesh has the Color component.
Definition mesh_requirements.h:62
Concept that is evaluated true if a Mesh has the CustomComponents component.
Definition mesh_requirements.h:71
HasFaces concepts is satisfied when at least one of its template types is (or inherits from) a vcl::m...
Definition face_container.h:1429
Concept that is evaluated true if a Mesh has the Mark component.
Definition mesh_requirements.h:80
Concept that is evaluated true if a Mesh has the Materials component.
Definition mesh_requirements.h:88
Concept that checks if a Mesh has the Name component.
Definition mesh_requirements.h:96
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:2169
Definition mesh_components.h:47
Definition mesh_components.h:49
Definition mesh_components.h:51
Definition mesh_components.h:53
Definition mesh_components.h:55
Definition mesh_components.h:57
bool isQuadMesh(const MeshType &m)
Checks at run time if the mesh is composed of quads.
Definition mesh_requirements.h:165
bool isTriangleMesh(const MeshType &m)
Checks at run time if the mesh m is composed of triangles.
Definition mesh_requirements.h:129
void requireTriangleMesh(const MeshType &m)
Checks if the mesh is composed of triangles, and if not, throws an exception.
Definition mesh_requirements.h:224
void requireCompactness(const MeshType &m)
Checks if a Mesh is compact, that is if it does not contains deleted elements, and if not,...
Definition mesh_requirements.h:281
void requireQuadMesh(const MeshType &m)
Checks if the mesh is composed of quads, and if not, throws an exception.
Definition mesh_requirements.h:257
bool isCompact(const MeshType &m)
Checks if a Mesh is compact, that is if it does not contains deleted elements.
Definition mesh_requirements.h:194