From 39f65b4d8f07462fd08323eed075c36fb3553abf Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 27 Feb 2014 06:38:44 +0000 Subject: [PATCH] Added some requireAttribute functions --- vcg/complex/base.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vcg/complex/base.h b/vcg/complex/base.h index a4d50437..4a6ab762 100644 --- a/vcg/complex/base.h +++ b/vcg/complex/base.h @@ -646,6 +646,10 @@ template void RequirePerFaceWedgeColor (MeshType &m) { if(!tr template void RequirePerFaceWedgeNormal (MeshType &m) { if(!tri::HasPerWedgeNormal (m)) throw vcg::MissingComponentException("PerFaceWedgeNormal "); } template void RequirePerFaceWedgeTexCoord(MeshType &m) { if(!tri::HasPerWedgeTexCoord(m)) throw vcg::MissingComponentException("PerFaceWedgeTexCoord"); } +template void RequirePerVertexAttribute(MeshType &m, const char *name) { if(!HasPerVertexAttribute(m,name)) throw vcg::MissingComponentException("PerVertex attribute"); } +template void RequirePerEdgeAttribute(MeshType &m, const char *name) { if(!HasPerEdgeAttribute(m,name)) throw vcg::MissingComponentException("PerEdge attribute"); } +template void RequirePerFaceAttribute(MeshType &m, const char *name) { if(!HasPerFaceAttribute(m,name)) throw vcg::MissingComponentException("PerFace attribute"); } +template void RequirePerMeshAttribute(MeshType &m, const char *name) { if(!HasPerMeshAttribute(m,name)) throw vcg::MissingComponentException("PerMesh attribute"); } /*@}*/ /*@}*/