diff --git a/vcg/complex/complex.h b/vcg/complex/complex.h index fb9644ee..ab93fa28 100644 --- a/vcg/complex/complex.h +++ b/vcg/complex/complex.h @@ -372,31 +372,6 @@ void Clear() C()=Color4b::Gray; } -/// Reflection functions that speak about vertex and face properties. -static bool HasPerVertexNormal() { return VertexType::HasNormal() ; } -static bool HasPerVertexColor() { return VertexType::HasColor() ; } -static bool HasPerVertexMark() { return VertexType::HasMark() ; } -static bool HasPerVertexQuality() { return VertexType::HasQuality(); } -static bool HasPerVertexTexCoord(){ return VertexType::HasTexCoord(); } -static bool HasPerVertexRadius() { return VertexType::HasRadius(); } -static bool HasPerVertexFlags() { return VertexType::HasFlags(); } - -static bool HasPolyInfo() { return FaceType::HasPolyInfo() ; } -static bool HasPerFaceColor() { return FaceType::HasFaceColor() ; } -static bool HasPerFaceNormal() { return FaceType::HasFaceNormal() ; } -static bool HasPerFaceMark() { return FaceType::HasFaceMark() ; } -static bool HasPerFaceQuality() { return FaceType::HasFaceQuality(); } -static bool HasPerFaceFlags() { return FaceType::HasFlags(); } - -static bool HasPerWedgeColor() { return FaceType::HasWedgeColor() ; } -static bool HasPerWedgeNormal() { return FaceType::HasWedgeNormal() ; } -static bool HasPerWedgeMark() { return FaceType::HasWedgeMark() ; } -static bool HasPerWedgeQuality() { return FaceType::HasWedgeQuality(); } -static bool HasPerWedgeTexCoord() { return FaceType::HasWedgeTexCoord(); } - -static bool HasFFTopology() { return FaceType::HasFFAdjacency(); } -static bool HasVFTopology() { return ((FaceType::HasVFAdjacency())&&(VertexType::HasVFAdjacency())); } -static bool HasTopology() { return HasFFTopology() || HasVFTopology(); } int & SimplexNumber(){ return fn;} int & VertexNumber(){ return vn;} @@ -486,80 +461,71 @@ template inline void Mark(MeshType & m, typename MeshType::Face template inline void UnMarkAll(MeshType & m) { ++m.imark; } - -template < class CType0, class CType1 , class CType2, class CType3> -bool HasPerVertexVFAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasVFAdjacency();} -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerFaceVFAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasVFAdjacency();} - template < class CType0, class CType1 , class CType2, class CType3> bool HasPerVertexVEAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasVEAdjacency();} template < class CType0, class CType1, class CType2 , class CType3> bool HasPerEdgeVEAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::EdgeContainer::value_type::HasVEAdjacency();} -template < class CType0, class CType1 , class CType2, class CType3> -bool HasPerVertexQuality (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasQuality();} +template < class VertexType> bool VertexVectorHasPerFaceVFAdjacency (const std::vector &) { return VertexType::HasVFAdjacency(); } +template < class FaceType > bool FaceVectorHasPerFaceVFAdjacency (const std::vector &) { return FaceType::HasVFAdjacency(); } -template < class CType0, class CType1 , class CType2, class CType3> -bool HasPerVertexMark (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasMark();} +template < class TriMeshType> bool HasPerFaceVFAdjacency (const TriMeshType &m) { return tri::FaceVectorHasPerFaceVFAdjacency (m.vert); } +template < class TriMeshType> bool HasPerVertexVFAdjacency (const TriMeshType &m) { return tri::VertexVectorHasPerFaceVFAdjacency(m.vert); } -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerVertexCurvature (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasCurvature();} -template < class CType0, class CType1 , class CType2, class CType3> -bool HasPerVertexCurvatureDir (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasCurvatureDir();} +template < class VertexType> bool VertexVectorHasPerVertexQuality (const std::vector &) { return VertexType::HasQuality (); } +template < class VertexType> bool VertexVectorHasPerVertexNormal (const std::vector &) { return VertexType::HasNormal (); } +template < class VertexType> bool VertexVectorHasPerVertexColor (const std::vector &) { return VertexType::HasColor (); } +template < class VertexType> bool VertexVectorHasPerVertexMark (const std::vector &) { return VertexType::HasMark (); } +template < class VertexType> bool VertexVectorHasPerVertexFlags (const std::vector &) { return VertexType::HasFlags (); } +template < class VertexType> bool VertexVectorHasPerVertexRadius (const std::vector &) { return VertexType::HasRadius (); } +template < class VertexType> bool VertexVectorHasPerVertexCurvature (const std::vector &) { return VertexType::HasCurvature (); } +template < class VertexType> bool VertexVectorHasPerVertexCurvatureDir(const std::vector &) { return VertexType::HasCurvatureDir(); } +template < class VertexType> bool VertexVectorHasPerVertexTexCoord (const std::vector &) { return VertexType::HasTexCoord (); } -template < class CType0, class CType1 , class CType2, class CType3> -bool HasPerVertexColor (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasColor();} +template < class TriMeshType> bool HasPerVertexQuality (const TriMeshType &m) { return tri::VertexVectorHasPerVertexQuality (m.vert); } +template < class TriMeshType> bool HasPerVertexNormal (const TriMeshType &m) { return tri::VertexVectorHasPerVertexNormal (m.vert); } +template < class TriMeshType> bool HasPerVertexColor (const TriMeshType &m) { return tri::VertexVectorHasPerVertexColor (m.vert); } +template < class TriMeshType> bool HasPerVertexMark (const TriMeshType &m) { return tri::VertexVectorHasPerVertexMark (m.vert); } +template < class TriMeshType> bool HasPerVertexFlags (const TriMeshType &m) { return tri::VertexVectorHasPerVertexFlags (m.vert); } +template < class TriMeshType> bool HasPerVertexRadius (const TriMeshType &m) { return tri::VertexVectorHasPerVertexRadius (m.vert); } +template < class TriMeshType> bool HasPerVertexCurvature (const TriMeshType &m) { return tri::VertexVectorHasPerVertexCurvature (m.vert); } +template < class TriMeshType> bool HasPerVertexCurvatureDir(const TriMeshType &m) { return tri::VertexVectorHasPerVertexCurvatureDir(m.vert); } +template < class TriMeshType> bool HasPerVertexTexCoord (const TriMeshType &m) { return tri::VertexVectorHasPerVertexTexCoord (m.vert); } -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerVertexTexCoord (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasTexCoord();} -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerVertexFlags (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasFlags();} - -template < class CType0, class CType1, class CType2, class CType3 > -bool HasPerVertexNormal (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasNormal();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerVertexRadius (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasRadius();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerWedgeTexCoord (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasWedgeTexCoord();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerWedgeNormal (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasWedgeNormal();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerWedgeColor (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasWedgeColor();} +template < class FaceType> bool FaceVectorHasPerWedgeColor (const std::vector &) { return FaceType::HasWedgeColor (); } +template < class FaceType> bool FaceVectorHasPerWedgeNormal (const std::vector &) { return FaceType::HasWedgeNormal (); } +template < class FaceType> bool FaceVectorHasPerWedgeTexCoord(const std::vector &) { return FaceType::HasWedgeTexCoord(); } +template < class TriMeshType> bool HasPerWedgeColor (const TriMeshType &m) { return tri::FaceVectorHasPerWedgeColor (m.face); } +template < class TriMeshType> bool HasPerWedgeNormal (const TriMeshType &m) { return tri::FaceVectorHasPerWedgeNormal (m.face); } +template < class TriMeshType> bool HasPerWedgeTexCoord(const TriMeshType &m) { return tri::FaceVectorHasPerWedgeTexCoord(m.face); } template < class CType0, class CType1, class CType2 , class CType3> bool HasPolyInfo (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasPolyInfo();} -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerFaceFlags (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasFlags();} +template < class FaceType> bool FaceVectorHasPerFaceFlags (const std::vector &) { return FaceType::HasFlags (); } +template < class FaceType> bool FaceVectorHasPerFaceNormal (const std::vector &) { return FaceType::HasFaceNormal (); } +template < class FaceType> bool FaceVectorHasPerFaceColor (const std::vector &) { return FaceType::HasFaceColor (); } +template < class FaceType> bool FaceVectorHasPerFaceMark (const std::vector &) { return FaceType::HasFaceMark (); } +template < class FaceType> bool FaceVectorHasPerFaceQuality(const std::vector &) { return FaceType::HasFaceQuality(); } +template < class FaceType> bool FaceVectorHasFFAdjacency (const std::vector &) { return FaceType::HasFFAdjacency(); } +template < class FaceType> bool FaceVectorHasFEAdjacency (const std::vector &) { return FaceType::HasFEAdjacency(); } +template < class FaceType> bool FaceVectorHasFVAdjacency (const std::vector &) { return FaceType::HasFVAdjacency(); } +template < class FaceType> bool FaceVectorHasPerFaceCurvatureDir (const std::vector &) { return FaceType::HasCurvatureDir(); } -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerFaceNormal (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasFaceNormal();} +template < class TriMeshType> bool HasPerFaceFlags (const TriMeshType &m) { return tri::FaceVectorHasPerFaceFlags (m.face); } +template < class TriMeshType> bool HasPerFaceNormal (const TriMeshType &m) { return tri::FaceVectorHasPerFaceNormal (m.face); } +template < class TriMeshType> bool HasPerFaceColor (const TriMeshType &m) { return tri::FaceVectorHasPerFaceColor (m.face); } +template < class TriMeshType> bool HasPerFaceMark (const TriMeshType &m) { return tri::FaceVectorHasPerFaceMark (m.face); } +template < class TriMeshType> bool HasPerFaceQuality (const TriMeshType &m) { return tri::FaceVectorHasPerFaceQuality (m.face); } +template < class TriMeshType> bool HasPerFaceCurvatureDir(const TriMeshType &m) { return tri::FaceVectorHasPerFaceCurvatureDir(m.face); } +template < class TriMeshType> bool HasFFAdjacency (const TriMeshType &m) { return tri::FaceVectorHasFFAdjacency (m.face); } +template < class TriMeshType> bool HasFEAdjacency (const TriMeshType &m) { return tri::FaceVectorHasFEAdjacency (m.face); } +template < class TriMeshType> bool HasFVAdjacency (const TriMeshType &m) { return tri::FaceVectorHasFVAdjacency (m.face); } -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerFaceColor (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasFaceColor();} -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerFaceMark (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasMark();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasPerFaceQuality (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasFaceQuality();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasFFAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasFFAdjacency();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasFEAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasFEAdjacency();} - -template < class CType0, class CType1, class CType2 , class CType3> -bool HasFVAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasFVAdjacency();} template < class CType0, class CType1, class CType2 , class CType3> bool HasVEAdjacency (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::VertContainer::value_type::HasVEAdjacency();} diff --git a/vcg/simplex/face/component_ocf.h b/vcg/simplex/face/component_ocf.h index 68e51a14..13fdd174 100644 --- a/vcg/simplex/face/component_ocf.h +++ b/vcg/simplex/face/component_ocf.h @@ -783,61 +783,53 @@ public: namespace tri { - - - template < class VertContainerType, class FaceType, class Container1, class Container2 > - bool HasPerFaceVFAdjacency (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m) - { - if(FaceType::HasVFAdjacencyOcf()) return m.face.IsVFAdjacencyEnabled(); - else return FaceType::FaceType::HasVFAdjacency(); - } - - template < class VertContainerType, class FaceType, class Container1, class Container2 > - bool HasFFAdjacency (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m) - { - if(FaceType::HasFFAdjacencyOcf()) return m.face.IsFFAdjacencyEnabled(); - else return FaceType::FaceType::HasFFAdjacency(); - } - - template < class VertContainerType, class FaceType, class Container1, class Container2 > - bool HasPerWedgeTexCoord (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m) - { - if(FaceType::HasWedgeTexCoordOcf()) return m.face.IsWedgeTexEnabled(); - else return FaceType::HasWedgeTexCoord(); - } - - template < class VertContainerType, class FaceType, class Container1, class Container2 > - bool HasPerFaceColor (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m) - { - if(FaceType::HasFaceColorOcf()) return m.face.IsColorEnabled(); - else return FaceType::HasFaceColor(); - } - template < class VertContainerType, class FaceType, class Container1, class Container2 > - bool HasPerFaceCurvatureDir (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m) - { - if(FaceType::HasFaceCurvatureDirOcf()) return m.face.IsCurvatureDirEnabled(); - else return FaceType::HasFaceCurvatureDir(); - } - - template < class VertContainerType, class FaceType, class Container1, class Container2 > - bool HasPerFaceQuality (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m) - { - if(FaceType::HasFaceQualityOcf()) return m.face.IsQualityEnabled(); - else return FaceType::HasFaceQuality(); - } - - template < class VertContainerType, class FaceType, class Container1, class Container2 > - bool HasPerFaceMark (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m) - { - if(FaceType::HasFaceMarkOcf()) return m.face.IsMarkEnabled(); - else return FaceType::HasFaceMark(); - } - - template < class FaceType > - void ReorderFace( std::vector &newFaceIndex, face::vector_ocf< FaceType > &faceVec) - { - faceVec.ReorderFace(newFaceIndex); - } + template < class FaceType > + bool FaceVectorHasPerFaceVFAdjacency(const face::vector_ocf &fv) + { + if(FaceType::HasVFAdjacencyOcf()) return fv.IsVFAdjacencyEnabled(); + else return FaceType::HasVFAdjacency(); + } + template < class FaceType > + bool FaceVectorHasFFAdjacency(const face::vector_ocf &fv) + { + if(FaceType::HasFFAdjacencyOcf()) return fv.IsFFAdjacencyEnabled(); + else return FaceType::HasFFAdjacency(); + } + template < class FaceType > + bool FaceVectorHasPerWedgeTexCoord(const face::vector_ocf &fv) + { + if(FaceType::HasWedgeTexCoordOcf()) return fv.IsWedgeTexEnabled(); + else return FaceType::HasWedgeTexCoord(); + } + template < class FaceType > + bool FaceVectorHasPerFaceColor(const face::vector_ocf &fv) + { + if(FaceType::HasFaceColorOcf()) return fv.IsColorEnabled(); + else return FaceType::HasFaceColor(); + } + template < class FaceType > + bool FaceVectorHasPerFaceQuality(const face::vector_ocf &fv) + { + if(FaceType::HasFaceQualityOcf()) return fv.IsQualityEnabled(); + else return FaceType::HasFaceQuality(); + } + template < class FaceType > + bool FaceVectorHasPerFaceMark(const face::vector_ocf &fv) + { + if(FaceType::HasFaceMarkOcf()) return fv.IsMarkEnabled(); + else return FaceType::HasFaceMark(); + } + template < class FaceType > + bool FaceVectorHasPerFaceCurvatureDir(const face::vector_ocf &fv) + { + if(FaceType::HasCurvatureDirOcf()) return fv.IsCurvatureDirEnabled(); + else return FaceType::HasCurvatureDir(); + } + template < class FaceType > + void ReorderFace( std::vector &newFaceIndex, face::vector_ocf< FaceType > &faceVec) + { + faceVec.ReorderFace(newFaceIndex); + } } }// end namespace vcg diff --git a/vcg/simplex/vertex/component_ocf.h b/vcg/simplex/vertex/component_ocf.h index 569ceb27..3fb14ae4 100644 --- a/vcg/simplex/vertex/component_ocf.h +++ b/vcg/simplex/vertex/component_ocf.h @@ -642,64 +642,48 @@ public: namespace tri { - - template < class, class,class, class> class TriMesh; - - template < class VertexType, class ContainerType0, class Container1, class Container2 > - bool HasPerVertexVFAdjacency (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, Container1, Container2 > & m) - { - if(VertexType::HasVFAdjacencyOcf()) return m.vert.IsVFAdjacencyEnabled(); - else return VertexType::HasVFAdjacency(); - } - - template < class VertexType, class ContainerType0, class ContainerType1 ,class ContainerType2 > - bool HasPerVertexRadius (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, ContainerType1, ContainerType2 > & m) - { - if(VertexType::HasRadiusOcf()) return m.vert.IsRadiusEnabled(); - else return VertexType::HasRadius(); - } - - template < class VertexType, class ContainerType0, class ContainerType1 ,class ContainerType2> - bool HasPerVertexQuality (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, ContainerType1, ContainerType2> & m) - { - if(VertexType::HasQualityOcf()) return m.vert.IsQualityEnabled(); - else return VertexType::HasQuality(); - } - - template < class VertexType, class ContainerType0, class ContainerType1 ,class ContainerType2 > - bool HasPerVertexTexCoord (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, ContainerType1, ContainerType2> & m) - { - if(VertexType::HasTexCoordOcf()) return m.vert.IsTexCoordEnabled(); - else return VertexType::HasTexCoord(); - } - - template < class VertexType, class ContainerType0, class ContainerType1 ,class ContainerType2 > - bool HasPerVertexNormal (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, ContainerType1, ContainerType2> & m) - { - if(VertexType::HasNormalOcf()) return m.vert.IsNormalEnabled(); - else return VertexType::HasNormal(); - } - - template < class VertexType, class ContainerType0, class ContainerType1 ,class ContainerType2> - bool HasPerVertexColor (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, ContainerType1, ContainerType2> & m) - { - if(VertexType::HasColorOcf()) return m.vert.IsColorEnabled(); - else return VertexType::HasColor(); - } - - template < class VertexType, class ContainerType0, class ContainerType1 ,class ContainerType2 > - bool HasPerVertexCurvature (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, ContainerType1, ContainerType2 > & m) - { - if(VertexType::HasCurvatureOcf()) return m.vert.IsCurvatureEnabled(); - else return VertexType::HasCurvature(); - } - - template < class VertexType, class ContainerType0, class ContainerType1 ,class ContainerType2> - bool HasPerVertexCurvatureDir (const TriMesh < vertex::vector_ocf< VertexType > , ContainerType0, ContainerType1, ContainerType2 > & m) - { - if(VertexType::HasCurvatureDirOcf()) return m.vert.IsCurvatureDirEnabled(); - else return VertexType::HasCurvatureDir(); - } +template < class VertexType > +bool VertexVectorHasPerVertexVFAdjacency(const vertex::vector_ocf &fv) +{ + if(VertexType::HasVFAdjacencyOcf()) return fv.IsVFAdjacencyEnabled(); + else return VertexType::HasVFAdjacency(); +} +template < class VertexType > +bool VertexVectorHasPerVertexRadius(const vertex::vector_ocf &fv) +{ + if(VertexType::HasRadiusOcf()) return fv.IsRadiusEnabled(); + else return VertexType::HasRadius(); +} +template < class VertexType > +bool VertexVectorHasPerVertexQuality(const vertex::vector_ocf &fv) +{ + if(VertexType::HasQualityOcf()) return fv.IsQualityEnabled(); + else return VertexType::HasQuality(); +} +template < class VertexType > +bool VertexVectorHasPerVertexNormal(const vertex::vector_ocf &fv) +{ + if(VertexType::HasNormalOcf()) return fv.IsNormalEnabled(); + else return VertexType::HasNormal(); +} +template < class VertexType > +bool VertexVectorHasPerVertexColor(const vertex::vector_ocf &fv) +{ + if(VertexType::HasColorOcf()) return fv.IsColorEnabled(); + else return VertexType::HasColor(); +} +template < class VertexType > +bool VertexVectorHasPerVertexCurvature(const vertex::vector_ocf &fv) +{ + if(VertexType::HasCurvatureOcf()) return fv.IsCurvatureEnabled(); + else return VertexType::HasCurvature(); +} +template < class VertexType > +bool VertexVectorHasPerVertexCurvatureDir(const vertex::vector_ocf &fv) +{ + if(VertexType::HasCurvatureDirOcf()) return fv.IsCurvatureDirEnabled(); + else return VertexType::HasCurvatureDir(); +} } }// end namespace vcg