From 4e46ff3be60d0cf3418e12feaebceb27046554f4 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 31 Oct 2008 12:27:37 +0000 Subject: [PATCH] Added HasPerVertexRadius(mesh) --- vcg/simplex/vertexplus/component_ocf.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vcg/simplex/vertexplus/component_ocf.h b/vcg/simplex/vertexplus/component_ocf.h index 41460f85..e0683e1a 100644 --- a/vcg/simplex/vertexplus/component_ocf.h +++ b/vcg/simplex/vertexplus/component_ocf.h @@ -303,6 +303,7 @@ void DisableCurvatureDir() { CuDV.clear(); } +bool IsRadiusEnabled() const {return RadiusEnabled;} void EnableRadius() { assert(VALUE_TYPE::HasRadiusOcf()); RadiusEnabled=true; @@ -606,6 +607,13 @@ namespace tri template < class, class > class TriMesh; + template < class VertexType, class FaceContainerType > + bool HasPerVertexRadius (const TriMesh < vertex::vector_ocf< VertexType > , FaceContainerType > & m) + { + if(VertexType::HasRadiusOcf()) return m.vert.IsRadiusEnabled(); + else return VertexType::HasRadius(); + } + template < class VertexType, class FaceContainerType > bool HasPerVertexQuality (const TriMesh < vertex::vector_ocf< VertexType > , FaceContainerType > & m) {