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>
104template<
typename MeshType>
113template<
typename MeshType>
138template<MeshConcept MeshType>
145 using F = MeshType::FaceType;
146 for (
const F& f :
m.faces()) {
147 if (f.vertexNumber() != 3)
174template<MeshConcept MeshType>
181 using F = MeshType::FaceType;
182 for (
const F& f :
m.faces()) {
183 if (f.vertexNumber() != 4)
203template<MeshConcept MeshType>
206 return m.isCompact();
233template<FaceMeshConcept MeshType>
237 for (
const auto& f :
m.faces()) {
238 if (f.vertexNumber() != 3) {
240 "Triangle Mesh Required.");
266template<FaceMeshConcept MeshType>
270 for (
const auto& f :
m.faces()) {
271 if (f.vertexNumber() != 4) {
290template<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:1389
Concept that is evaluated true if a Mesh has the Mark component.
Definition mesh_requirements.h:80
Concept that checks if a Mesh has the Name component.
Definition mesh_requirements.h:88
Definition face_requirements.h:56
Concept that checks if a Mesh has the TextureImages component.
Definition mesh_requirements.h:96
Concept that checks if a Mesh has the TexturePaths component.
Definition mesh_requirements.h:105
Definition face_requirements.h:52
A concept that checks whether a class is (inherits from) a Mesh class.
Definition mesh.h:2167
Definition mesh_components.h:48
Definition mesh_components.h:50
Definition mesh_components.h:52
Definition mesh_components.h:54
Definition mesh_components.h:56
Definition mesh_components.h:58
Definition mesh_components.h:60
bool isQuadMesh(const MeshType &m)
Checks at run time if the mesh is composed of quads.
Definition mesh_requirements.h:175
bool isTriangleMesh(const MeshType &m)
Checks at run time if the mesh m is composed of triangles.
Definition mesh_requirements.h:139
void requireTriangleMesh(const MeshType &m)
Checks if the mesh is composed of triangles, and if not, throws an exception.
Definition mesh_requirements.h:234
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:291
void requireQuadMesh(const MeshType &m)
Checks if the mesh is composed of quads, and if not, throws an exception.
Definition mesh_requirements.h:267
bool isCompact(const MeshType &m)
Checks if a Mesh is compact, that is if it does not contains deleted elements.
Definition mesh_requirements.h:204