23#ifndef VCL_MESH_REQUIREMENTS_MESH_REQUIREMENTS_H
24#define VCL_MESH_REQUIREMENTS_MESH_REQUIREMENTS_H
26#include <vclib/concepts/mesh.h>
27#include <vclib/exceptions/mesh.h>
52template<MeshConcept MeshType>
59 using F = MeshType::FaceType;
60 for (
const F& f :
m.faces()) {
61 if (f.vertexNumber() != 3)
88template<MeshConcept MeshType>
95 using F = MeshType::FaceType;
96 for (
const F& f :
m.faces()) {
97 if (f.vertexNumber() != 4)
117template<MeshConcept MeshType>
120 return m.isCompact();
147template<FaceMeshConcept MeshType>
151 for (
const auto& f :
m.faces()) {
152 if (f.vertexNumber() != 3) {
154 "Triangle Mesh Required.");
180template<FaceMeshConcept MeshType>
184 for (
const auto& f :
m.faces()) {
185 if (f.vertexNumber() != 4) {
204template<MeshConcept MeshType>
Exception thrown when the mesh is not compact.
Definition mesh.h:81
Exception thrown when an input/output mesh is not composed of quads.
Definition mesh.h:148
Exception thrown when an input/output mesh is not composed of triangles.
Definition mesh.h:126
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
HasFaces concepts is satisfied when at least one of its template types is (or inherits from) a vcl::m...
Definition face_container.h:133
bool isQuadMesh(const MeshType &m)
Checks at run time if the mesh is composed of quads.
Definition mesh_requirements.h:89
bool isTriangleMesh(const MeshType &m)
Checks at run time if the mesh m is composed of triangles.
Definition mesh_requirements.h:53
void requireTriangleMesh(const MeshType &m)
Checks if the mesh is composed of triangles, and if not, throws an exception.
Definition mesh_requirements.h:148
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:205
void requireQuadMesh(const MeshType &m)
Checks if the mesh is composed of quads, and if not, throws an exception.
Definition mesh_requirements.h:181
bool isCompact(const MeshType &m)
Checks if a Mesh is compact, that is if it does not contains deleted elements.
Definition mesh_requirements.h:118