splitted compactness requirements
This commit is contained in:
parent
a597aea988
commit
155806f53e
|
@ -637,11 +637,21 @@ bool HasPerMeshAttribute(const MeshType &m, std::string name){
|
|||
return (ai!= m.mesh_attr.end() ) ;
|
||||
}
|
||||
|
||||
template <class MeshType> void RequireCompactness (MeshType &m) {
|
||||
template <class MeshType> void RequireVertexCompactness (MeshType &m) {
|
||||
if(m.vert.size()!=size_t(m.vn)) throw vcg::MissingCompactnessException("Vertex Vector Contains deleted elements");
|
||||
if(m.edge.size()!=size_t(m.en)) throw vcg::MissingCompactnessException("Edge Vector Contains deleted elements");
|
||||
}
|
||||
template <class MeshType> void RequireFaceCompactness (MeshType &m) {
|
||||
if(m.face.size()!=size_t(m.fn)) throw vcg::MissingCompactnessException("Face Vector Contains deleted elements");
|
||||
}
|
||||
template <class MeshType> void RequireEdgeCompactness (MeshType &m) {
|
||||
if(m.edge.size()!=size_t(m.en)) throw vcg::MissingCompactnessException("Edge Vector Contains deleted elements");
|
||||
}
|
||||
|
||||
template <class MeshType> void RequireCompactness (MeshType &m) {
|
||||
RequireVertexCompactness<MeshType>(m);
|
||||
RequireFaceCompactness<MeshType> (m);
|
||||
RequireEdgeCompactness<MeshType> (m);
|
||||
}
|
||||
|
||||
template <class MeshType> void RequireTriangularMesh (MeshType &m ) { if( tri::HasPolyInfo( m ) ) throw vcg::MissingTriangularRequirementException("");}
|
||||
template <class MeshType> void RequirePolygonalMesh (MeshType &m ) { if(!tri::HasPolyInfo( m ) ) throw vcg::MissingPolygonalRequirementException("");}
|
||||
|
|
Loading…
Reference in New Issue