From b278f291293e8aafb1de8414790d4a62dd75c0a4 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 3 Nov 2014 14:34:35 +0000 Subject: [PATCH] Changed many explicit exception throwing for missing components into the shorthand RequireXXXX --- vcg/complex/algorithms/update/normal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/complex/algorithms/update/normal.h b/vcg/complex/algorithms/update/normal.h index ca139a76..376ce35b 100644 --- a/vcg/complex/algorithms/update/normal.h +++ b/vcg/complex/algorithms/update/normal.h @@ -66,7 +66,7 @@ typedef typename MeshType::FaceIterator FaceIterator; */ static void PerVertexClear(ComputeMeshType &m, bool ClearAllVertNormal=false) { - if(!HasPerVertexNormal(m)) throw vcg::MissingComponentException("PerVertexNormal"); + RequirePerVertexNormal(m); if(ClearAllVertNormal) UpdateFlags::VertexClearV(m); else @@ -160,7 +160,7 @@ static void PerVertexNelsonMaxWeighted(ComputeMeshType &m) /// Not normalized. Use PerFaceNormalized() or call NormalizePerVertex() if you need unit length per face normals. static void PerFace(ComputeMeshType &m) { - if(!HasPerFaceNormal(m)) throw vcg::MissingComponentException("PerFaceNormal"); + RequirePerFaceNormal(m); for(FaceIterator f=m.face.begin();f!=m.face.end();++f) if( !(*f).IsD() ) face::ComputeNormal(*f);