From 4198a3bd7caa6f73618390ee6873ba2fd83b309b Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 19 Jun 2014 08:31:51 +0000 Subject: [PATCH] Cleaned up various type name clashes. There were some components that wrongly re-defined covering the real of the simplex. Renamed to something less ambiguous (like CurScalarType for denoting the scalar type used inside curvature types). --- vcg/complex/base.h | 2 +- vcg/simplex/face/component.h | 24 +-- vcg/simplex/face/component_ocf.h | 28 +-- vcg/simplex/vertex/component_ocf.h | 325 ++++++++++++++--------------- 4 files changed, 189 insertions(+), 190 deletions(-) diff --git a/vcg/complex/base.h b/vcg/complex/base.h index 1c4700de..400fa404 100644 --- a/vcg/complex/base.h +++ b/vcg/complex/base.h @@ -217,7 +217,7 @@ class TriMesh inline int HN() const { return hn; } /// Bounding box of the mesh - Box3 bbox; + Box3 bbox; /// Nomi di textures // diff --git a/vcg/simplex/face/component.h b/vcg/simplex/face/component.h index f6c6bbf6..31e8560b 100644 --- a/vcg/simplex/face/component.h +++ b/vcg/simplex/face/component.h @@ -483,8 +483,8 @@ private: /*-------------------------- Curvature Direction ----------------------------------*/ template struct CurvatureDirBaseType{ - typedef Point3 VecType; - typedef S ScalarType; + typedef Point3 CurVecType; + typedef S CurScalarType; CurvatureDirBaseType () {} Point3max_dir,min_dir; // max and min curvature direction S k1,k2;// max and min curvature values @@ -493,18 +493,18 @@ struct CurvatureDirBaseType{ template class CurvatureDir: public TT { public: typedef A CurvatureDirType; - typedef typename CurvatureDirType::VecType VecType; - typedef typename CurvatureDirType::ScalarType ScalarType; + typedef typename CurvatureDirType::VecType CurVecType; + typedef typename CurvatureDirType::ScalarType CurScalarType; - VecType &PD1() { return _curv.max_dir;} - VecType &PD2() { return _curv.min_dir;} - VecType cPD1() const { return _curv.max_dir;} - VecType cPD2() const { return _curv.min_dir;} + CurVecType &PD1() { return _curv.max_dir;} + CurVecType &PD2() { return _curv.min_dir;} + CurVecType cPD1() const { return _curv.max_dir;} + CurVecType cPD2() const { return _curv.min_dir;} - ScalarType &K1() { return _curv.k1;} - ScalarType &K2() { return _curv.k2;} - ScalarType cK1() const {return _curv.k1;} - ScalarType cK2() const {return _curv.k2;} + CurScalarType &K1() { return _curv.k1;} + CurScalarType &K2() { return _curv.k2;} + CurScalarType cK1() const {return _curv.k1;} + CurScalarType cK2() const {return _curv.k2;} template < class RightValueType> void ImportData(const RightValueType & rightF ) { if(rightF.IsCurvatureDirEnabled()) { diff --git a/vcg/simplex/face/component_ocf.h b/vcg/simplex/face/component_ocf.h index ceb6ddef..4ea59694 100644 --- a/vcg/simplex/face/component_ocf.h +++ b/vcg/simplex/face/component_ocf.h @@ -494,59 +494,59 @@ template class Normal3dOcf: public NormalOcf {}; /*------------------------- CurvatureDir -----------------------------------------*/ template struct CurvatureDirOcfBaseType{ - typedef Point3 VecType; - typedef S ScalarType; + typedef Point3 CurVecType; + typedef S CurScalarType; CurvatureDirOcfBaseType () {} - Point3max_dir,min_dir; // max and min curvature direction - S k1,k2;// max and min curvature values + CurVecType max_dir,min_dir; // max and min curvature direction + CurScalarType k1,k2;// max and min curvature values }; template class CurvatureDirOcf: public T { public: typedef A CurvatureDirType; - typedef typename CurvatureDirType::VecType VecType; - typedef typename CurvatureDirType::ScalarType ScalarType; + typedef typename CurvatureDirType::VecType CurVecType; + typedef typename CurvatureDirType::ScalarType CurScalarType; inline bool IsCurvatureDirEnabled( ) const { return this->Base().IsCurvatureDirEnabled(); } static bool HasCurvatureDir() { return true; } static bool HasCurvatureDirOcf() { return true; } - VecType &PD1() { + CurVecType &PD1() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CDV[(*this).Index()].max_dir; } - VecType &PD2() { + CurVecType &PD2() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CDV[(*this).Index()].min_dir; } - VecType cPD1() const { + CurVecType cPD1() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CDV[(*this).Index()].max_dir; } - VecType cPD2() const { + CurVecType cPD2() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CDV[(*this).Index()].min_dir; } - ScalarType &K1() { + CurScalarType &K1() { // you cannot use Normals before enabling them with: yourmesh.face.EnableNormal() assert((*this).Base().NormalEnabled); return (*this).Base().CDV[(*this).Index()].k1; } - ScalarType &K2() { + CurScalarType &K2() { // you cannot use Normals before enabling them with: yourmesh.face.EnableNormal() assert((*this).Base().NormalEnabled); return (*this).Base().CDV[(*this).Index()].k2; } - ScalarType cK1() const { + CurScalarType cK1() const { // you cannot use Normals before enabling them with: yourmesh.face.EnableNormal() assert((*this).Base().NormalEnabled); return (*this).Base().CDV[(*this).Index()].k1; } - ScalarType cK2() const { + CurScalarType cK2() const { // you cannot use Normals before enabling them with: yourmesh.face.EnableNormal() assert((*this).Base().NormalEnabled); return (*this).Base().CDV[(*this).Index()].k2; diff --git a/vcg/simplex/vertex/component_ocf.h b/vcg/simplex/vertex/component_ocf.h index cb447c93..8de4c32b 100644 --- a/vcg/simplex/vertex/component_ocf.h +++ b/vcg/simplex/vertex/component_ocf.h @@ -35,15 +35,15 @@ compare with OCC(Optional Component Compact) #endif namespace vcg { - namespace vertex { + namespace vertex { /* All the Components that can be added to a vertex should be defined in the namespace vert: */ template class vector_ocf: public std::vector { - typedef std::vector BaseType; - typedef typename vector_ocf::iterator ThisTypeIterator; + typedef std::vector BaseType; + typedef typename vector_ocf::iterator ThisTypeIterator; public: vector_ocf():std::vector() @@ -79,164 +79,164 @@ public: void pop_back(); - void resize(const unsigned int & _size) - { - const unsigned int oldsize = BaseType::size(); - BaseType::resize(_size); - if(oldsize<_size){ - ThisTypeIterator firstnew = BaseType::begin(); - advance(firstnew,oldsize); - _updateOVP(firstnew,(*this).end()); - } - if (ColorEnabled) CV.resize(_size); - if (QualityEnabled) QV.resize(_size,0); - if (MarkEnabled) MV.resize(_size); - if (NormalEnabled) NV.resize(_size); - if (TexCoordEnabled) TV.resize(_size); - if (VFAdjacencyEnabled) AV.resize(_size); - if (CurvatureEnabled) CuV.resize(_size); - if (CurvatureDirEnabled) CuDV.resize(_size); - if (RadiusEnabled) RadiusV.resize(_size); - } + void resize(const unsigned int & _size) + { + const unsigned int oldsize = BaseType::size(); + BaseType::resize(_size); + if(oldsize<_size){ + ThisTypeIterator firstnew = BaseType::begin(); + advance(firstnew,oldsize); + _updateOVP(firstnew,(*this).end()); + } + if (ColorEnabled) CV.resize(_size); + if (QualityEnabled) QV.resize(_size,0); + if (MarkEnabled) MV.resize(_size); + if (NormalEnabled) NV.resize(_size); + if (TexCoordEnabled) TV.resize(_size); + if (VFAdjacencyEnabled) AV.resize(_size); + if (CurvatureEnabled) CuV.resize(_size); + if (CurvatureDirEnabled) CuDV.resize(_size); + if (RadiusEnabled) RadiusV.resize(_size); + } - void reserve(const unsigned int & _size) - { - BaseType::reserve(_size); - if (ColorEnabled) CV.reserve(_size); - if (QualityEnabled) QV.reserve(_size); - if (MarkEnabled) MV.reserve(_size); - if (NormalEnabled) NV.reserve(_size); - if (TexCoordEnabled) TV.reserve(_size); - if (VFAdjacencyEnabled) AV.reserve(_size); - if (CurvatureEnabled) CuV.reserve(_size); - if (CurvatureDirEnabled) CuDV.reserve(_size); - if (RadiusEnabled) RadiusV.reserve(_size); - } + void reserve(const unsigned int & _size) + { + BaseType::reserve(_size); + if (ColorEnabled) CV.reserve(_size); + if (QualityEnabled) QV.reserve(_size); + if (MarkEnabled) MV.reserve(_size); + if (NormalEnabled) NV.reserve(_size); + if (TexCoordEnabled) TV.reserve(_size); + if (VFAdjacencyEnabled) AV.reserve(_size); + if (CurvatureEnabled) CuV.reserve(_size); + if (CurvatureDirEnabled) CuDV.reserve(_size); + if (RadiusEnabled) RadiusV.reserve(_size); + } - void _updateOVP(ThisTypeIterator lbegin, ThisTypeIterator lend) - { - ThisTypeIterator vi; - for(vi=lbegin;vi!=lend;++vi) - (*vi)._ovp=this; - } + void _updateOVP(ThisTypeIterator lbegin, ThisTypeIterator lend) + { + ThisTypeIterator vi; + for(vi=lbegin;vi!=lend;++vi) + (*vi)._ovp=this; + } //////////////////////////////////////// // Enabling Eunctions bool IsQualityEnabled() const {return QualityEnabled;} void EnableQuality() { - assert(VALUE_TYPE::HasQualityOcf()); - QualityEnabled=true; - QV.resize((*this).size(),0); + assert(VALUE_TYPE::HasQualityOcf()); + QualityEnabled=true; + QV.resize((*this).size(),0); } void DisableQuality() { - assert(VALUE_TYPE::HasQualityOcf()); - QualityEnabled=false; - QV.clear(); + assert(VALUE_TYPE::HasQualityOcf()); + QualityEnabled=false; + QV.clear(); } bool IsColorEnabled() const {return ColorEnabled;} void EnableColor() { - assert(VALUE_TYPE::HasColorOcf()); - ColorEnabled=true; - CV.resize((*this).size()); + assert(VALUE_TYPE::HasColorOcf()); + ColorEnabled=true; + CV.resize((*this).size()); } void DisableColor() { - assert(VALUE_TYPE::HasColorOcf()); - ColorEnabled=false; - CV.clear(); + assert(VALUE_TYPE::HasColorOcf()); + ColorEnabled=false; + CV.clear(); } bool IsMarkEnabled() const {return MarkEnabled;} void EnableMark() { - assert(VALUE_TYPE::HasMarkOcf()); - MarkEnabled=true; - MV.resize((*this).size(),0); + assert(VALUE_TYPE::HasMarkOcf()); + MarkEnabled=true; + MV.resize((*this).size(),0); } void DisableMark() { - assert(VALUE_TYPE::HasMarkOcf()); - MarkEnabled=false; - MV.clear(); + assert(VALUE_TYPE::HasMarkOcf()); + MarkEnabled=false; + MV.clear(); } bool IsNormalEnabled() const {return NormalEnabled;} void EnableNormal() { - assert(VALUE_TYPE::HasNormalOcf()); - NormalEnabled=true; - NV.resize((*this).size()); + assert(VALUE_TYPE::HasNormalOcf()); + NormalEnabled=true; + NV.resize((*this).size()); } void DisableNormal() { - assert(VALUE_TYPE::HasNormalOcf()); - NormalEnabled=false; - NV.clear(); + assert(VALUE_TYPE::HasNormalOcf()); + NormalEnabled=false; + NV.clear(); } bool IsVFAdjacencyEnabled() const {return VFAdjacencyEnabled;} void EnableVFAdjacency() { - assert(VALUE_TYPE::HasVFAdjacencyOcf()); - VFAdjacencyEnabled=true; - VFAdjType zero; zero._fp=0; zero._zp=-1; - AV.resize((*this).size(),zero); + assert(VALUE_TYPE::HasVFAdjacencyOcf()); + VFAdjacencyEnabled=true; + VFAdjType zero; zero._fp=0; zero._zp=-1; + AV.resize((*this).size(),zero); } void DisableVFAdjacency() { - assert(VALUE_TYPE::HasVFAdjacencyOcf()); - VFAdjacencyEnabled=false; - AV.clear(); + assert(VALUE_TYPE::HasVFAdjacencyOcf()); + VFAdjacencyEnabled=false; + AV.clear(); } bool IsCurvatureEnabled() const {return CurvatureEnabled;} void EnableCurvature() { - assert(VALUE_TYPE::HasCurvatureOcf()); - CurvatureEnabled=true; - CuV.resize((*this).size()); + assert(VALUE_TYPE::HasCurvatureOcf()); + CurvatureEnabled=true; + CuV.resize((*this).size()); } void DisableCurvature() { - assert(VALUE_TYPE::HasCurvatureOcf()); - CurvatureEnabled=false; - CuV.clear(); + assert(VALUE_TYPE::HasCurvatureOcf()); + CurvatureEnabled=false; + CuV.clear(); } bool IsCurvatureDirEnabled() const {return CurvatureDirEnabled;} void EnableCurvatureDir() { - assert(VALUE_TYPE::HasCurvatureDirOcf()); - CurvatureDirEnabled=true; - CuDV.resize((*this).size()); + assert(VALUE_TYPE::HasCurvatureDirOcf()); + CurvatureDirEnabled=true; + CuDV.resize((*this).size()); } void DisableCurvatureDir() { - assert(VALUE_TYPE::HasCurvatureDirOcf()); - CurvatureDirEnabled=false; - CuDV.clear(); + assert(VALUE_TYPE::HasCurvatureDirOcf()); + CurvatureDirEnabled=false; + CuDV.clear(); } bool IsRadiusEnabled() const {return RadiusEnabled;} void EnableRadius() { - assert(VALUE_TYPE::HasRadiusOcf()); - RadiusEnabled=true; - RadiusV.resize((*this).size()); + assert(VALUE_TYPE::HasRadiusOcf()); + RadiusEnabled=true; + RadiusV.resize((*this).size()); } void DisableRadius() { - assert(VALUE_TYPE::HasRadiusOcf()); - RadiusEnabled=false; - RadiusV.clear(); + assert(VALUE_TYPE::HasRadiusOcf()); + RadiusEnabled=false; + RadiusV.clear(); } bool IsTexCoordEnabled() const {return TexCoordEnabled;} void EnableTexCoord() { - assert(VALUE_TYPE::HasTexCoordOcf()); - TexCoordEnabled=true; - TV.resize((*this).size()); + assert(VALUE_TYPE::HasTexCoordOcf()); + TexCoordEnabled=true; + TV.resize((*this).size()); } void DisableTexCoord() { - assert(VALUE_TYPE::HasTexCoordOcf()); - TexCoordEnabled=false; - TV.clear(); + assert(VALUE_TYPE::HasTexCoordOcf()); + TexCoordEnabled=false; + TV.clear(); } struct VFAdjType { - typename VALUE_TYPE::FacePointer _fp ; - int _zp ; - }; + typename VALUE_TYPE::FacePointer _fp ; + int _zp ; + }; public: std::vector CV; @@ -269,14 +269,14 @@ public: template class VFAdjOcf: public T { public: - typename T::FacePointer &VFp() { - assert((*this).Base().VFAdjacencyEnabled); - return (*this).Base().AV[(*this).Index()]._fp; - } - typename T::FacePointer cVFp() const { - if(! (*this).Base().VFAdjacencyEnabled ) return 0; - else return (*this).Base().AV[(*this).Index()]._fp; - } + typename T::FacePointer &VFp() { + assert((*this).Base().VFAdjacencyEnabled); + return (*this).Base().AV[(*this).Index()]._fp; + } + typename T::FacePointer cVFp() const { + if(! (*this).Base().VFAdjacencyEnabled ) return 0; + else return (*this).Base().AV[(*this).Index()]._fp; + } int &VFi() { assert((*this).Base().VFAdjacencyEnabled); @@ -428,12 +428,12 @@ public: template class CurvatureOcf: public TT { public: typedef Point2 CurvatureType; - typedef typename CurvatureType::ScalarType ScalarType; + typedef typename CurvatureType::ScalarType CurScalarType; - ScalarType &Kh(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][0];} - ScalarType &Kg(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][1];} - ScalarType cKh() const { assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][0];} - ScalarType cKg() const { assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][1];} + CurScalarType &Kh(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][0];} + CurScalarType &Kg(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][1];} + CurScalarType cKh() const { assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][0];} + CurScalarType cKg() const { assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][1];} template void ImportData(const RightVertexType & rightV){ @@ -458,29 +458,29 @@ template class CurvaturedOcf: public CurvatureOcf {public: template struct CurvatureDirTypeOcf{ - typedef Point3 VecType; - typedef S ScalarType; - CurvatureDirTypeOcf () {} - Point3max_dir,min_dir; - S k1,k2; + typedef Point3 CurVecType; + typedef S CurScalarType; + CurvatureDirTypeOcf () {} + CurVecType max_dir,min_dir; + CurScalarType k1,k2; }; template class CurvatureDirOcf: public TT { public: typedef A CurvatureDirType; - typedef typename CurvatureDirType::VecType VecType; - typedef typename CurvatureDirType::ScalarType ScalarType; + typedef typename CurvatureDirType::CurVecType CurVecType; + typedef typename CurvatureDirType::CurScalarType CurScalarType; - VecType &PD1() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].max_dir;} - VecType &PD2() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].min_dir;} - VecType cPD1() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].max_dir;} - VecType cPD2() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].min_dir;} + CurVecType &PD1() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].max_dir;} + CurVecType &PD2() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].min_dir;} + CurVecType cPD1() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].max_dir;} + CurVecType cPD2() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].min_dir;} - ScalarType &K1() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k1;} - ScalarType &K2() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k2;} - ScalarType cK1() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k1;} - ScalarType cK2() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k2;} + CurScalarType &K1() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k1;} + CurScalarType &K2() { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k2;} + CurScalarType cK1() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k1;} + CurScalarType cK2() const { assert((*this).Base().CurvatureDirEnabled); return (*this).Base().CuDV[(*this).Index()].k2;} template void ImportData(const RightVertexType & rightV){ @@ -513,7 +513,6 @@ public: static void Name(std::vector & name){name.push_back(std::st template class RadiusOcf: public TT { public: typedef A RadiusType; - typedef RadiusType ScalarType; const RadiusType &R() const { assert((*this).Base().RadiusEnabled); return (*this).Base().RadiusV[(*this).Index()];} RadiusType &R() { assert((*this).Base().RadiusEnabled); return (*this).Base().RadiusV[(*this).Index()];} @@ -541,31 +540,31 @@ template class RadiusdOcf: public RadiusOcf {}; template < class T> class InfoOcf: public T { public: - // You should never ever try to copy a vertex that has OCF stuff. - // use ImportData function. - inline InfoOcf &operator=(const InfoOcf & /*other*/) { - assert(0); return *this; - } + // You should never ever try to copy a vertex that has OCF stuff. + // use ImportData function. + inline InfoOcf &operator=(const InfoOcf & /*other*/) { + assert(0); return *this; + } - vector_ocf &Base() const { return *_ovp;} + vector_ocf &Base() const { return *_ovp;} - inline int Index() const { - typename T::VertexType const *tp=static_cast(this); - int tt2=tp- &*(_ovp->begin()); - return tt2; - } + inline int Index() const { + typename T::VertexType const *tp=static_cast(this); + int tt2=tp- &*(_ovp->begin()); + return tt2; + } public: - vector_ocf *_ovp; + vector_ocf *_ovp; - static bool HasColorOcf() { return false; } - static bool HasCurvatureOcf() { return false; } - static bool HasCurvatureDirOcf() { return false; } - static bool HasNormalOcf() { return false; } - static bool HasMarkOcf() { return false; } - static bool HasQualityOcf() { return false; } - static bool HasRadiusOcf() { return false; } - static bool HasTexCoordOcf() { return false; } - static bool HasVFAdjacencyOcf() { return false; } + static bool HasColorOcf() { return false; } + static bool HasCurvatureOcf() { return false; } + static bool HasCurvatureDirOcf() { return false; } + static bool HasNormalOcf() { return false; } + static bool HasMarkOcf() { return false; } + static bool HasQualityOcf() { return false; } + static bool HasRadiusOcf() { return false; } + static bool HasTexCoordOcf() { return false; } + static bool HasVFAdjacencyOcf() { return false; } }; @@ -583,45 +582,45 @@ bool VertexVectorHasVFAdjacency(const vertex::vector_ocf &fv) template < class VertexType > bool VertexVectorHasPerVertexRadius(const vertex::vector_ocf &fv) { - if(VertexType::HasRadiusOcf()) return fv.IsRadiusEnabled(); - else return VertexType::HasRadius(); + 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(); + 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(); + 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(); + 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(); + 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(); + if(VertexType::HasCurvatureDirOcf()) return fv.IsCurvatureDirEnabled(); + else return VertexType::HasCurvatureDir(); } template < class VertexType > bool VertexVectorHasPerVertexTexCoord(const vertex::vector_ocf &fv) { - if(VertexType::HasTexCoordOcf()) return fv.IsTexCoordEnabled(); - else return VertexType::HasTexCoord(); + if(VertexType::HasTexCoordOcf()) return fv.IsTexCoordEnabled(); + else return VertexType::HasTexCoord(); } } }// end namespace vcg