From 1c5f2c2264a74028ef70cd5f79fa67644aca205d Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Tue, 10 Apr 2012 16:47:15 +0000 Subject: [PATCH] added static capability query function for ocf vertex texcoord (VertexVectorHasPerVertexTexCoord()) (not having it caused false positives). --- vcg/simplex/vertex/component_ocf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vcg/simplex/vertex/component_ocf.h b/vcg/simplex/vertex/component_ocf.h index 5ae5b0b8..f6ac33c3 100644 --- a/vcg/simplex/vertex/component_ocf.h +++ b/vcg/simplex/vertex/component_ocf.h @@ -687,6 +687,12 @@ bool VertexVectorHasPerVertexCurvatureDir(const vertex::vector_ocf & else return VertexType::HasCurvatureDir(); } +template < class VertexType > +bool VertexVectorHasPerVertexTexCoord(const vertex::vector_ocf &fv) +{ + if(VertexType::HasTexCoordOcf()) return fv.IsTexCoordEnabled(); + else return VertexType::HasTexCoord(); +} } }// end namespace vcg #endif