removed useless HG components from the vertex component set

Replaced by much simpler attributes
This commit is contained in:
Paolo Cignoni 2021-10-29 14:26:00 +02:00 committed by alemuntoni
parent e076810394
commit 0aac589996
3 changed files with 0 additions and 96 deletions

View File

@ -666,7 +666,6 @@ template < class VertexType> bool VertexVectorHasPerVertexColor (const std
template < class VertexType> bool VertexVectorHasPerVertexMark (const std::vector<VertexType> &) { return VertexType::HasMark (); }
template < class VertexType> bool VertexVectorHasPerVertexFlags (const std::vector<VertexType> &) { return VertexType::HasFlags (); }
template < class VertexType> bool VertexVectorHasPerVertexRadius (const std::vector<VertexType> &) { return VertexType::HasRadius (); }
template < class VertexType> bool VertexVectorHasPerVertexCurvature (const std::vector<VertexType> &) { return VertexType::HasCurvature (); }
template < class VertexType> bool VertexVectorHasPerVertexCurvatureDir(const std::vector<VertexType> &) { return VertexType::HasCurvatureDir(); }
template < class VertexType> bool VertexVectorHasPerVertexTexCoord (const std::vector<VertexType> &) { return VertexType::HasTexCoord (); }
@ -676,7 +675,6 @@ template < class TriMeshType> bool HasPerVertexColor (const TriMeshType &m
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); }
@ -877,7 +875,6 @@ template <class MeshType> void RequirePerVertexColor (const MeshType &m) {
template <class MeshType> void RequirePerVertexMark (const MeshType &m) { if(!tri::HasPerVertexMark (m)) throw vcg::MissingComponentException("PerVertexMark "); }
template <class MeshType> void RequirePerVertexFlags (const MeshType &m) { if(!tri::HasPerVertexFlags (m)) throw vcg::MissingComponentException("PerVertexFlags "); }
template <class MeshType> void RequirePerVertexRadius (const MeshType &m) { if(!tri::HasPerVertexRadius (m)) throw vcg::MissingComponentException("PerVertexRadius "); }
template <class MeshType> void RequirePerVertexCurvature (const MeshType &m) { if(!tri::HasPerVertexCurvature (m)) throw vcg::MissingComponentException("PerVertexCurvature "); }
template <class MeshType> void RequirePerVertexCurvatureDir(const MeshType &m) { if(!tri::HasPerVertexCurvatureDir(m)) throw vcg::MissingComponentException("PerVertexCurvatureDir"); }
template <class MeshType> void RequirePerVertexTexCoord (const MeshType &m) { if(!tri::HasPerVertexTexCoord (m)) throw vcg::MissingComponentException("PerVertexTexCoord "); }

View File

@ -158,15 +158,8 @@ public:
static bool HasVHAdjacency() { return false; }
typedef float CurScalarType;
typedef float ScalarTypeCur;
typedef Point3f CurVecType;
typedef Point2f CurvatureType;
float &Kh() { static float dummy = 0.f; assert(0);return dummy;}
float &Kg() { static float dummy = 0.f; assert(0);return dummy;}
float Kh() const { static float dummy = 0.f; assert(0); return dummy;}
float Kg() const { static float dummy = 0.f; assert(0); return dummy;}
float cKh() const { static float dummy = 0.f; assert(0); return dummy;}
float cKg() const { static float dummy = 0.f; assert(0); return dummy;}
typedef CurvatureDirBaseType<float> CurvatureDirType;
CurVecType &PD1() {static CurVecType v(0,0,0); assert(0);return v;}
@ -183,9 +176,7 @@ public:
CurScalarType cK1() const {static ScalarType v = 0.0;assert(0);return v;}
CurScalarType cK2() const {static ScalarType v = 0.0;assert(0);return v;}
static bool HasCurvature() { return false; }
static bool HasCurvatureDir() { return false; }
inline bool IsCurvatureEnabled() const { return TT::VertexType::HasCurvature();}
inline bool IsCurvatureDirEnabled() const { return TT::VertexType::HasCurvatureDir();}
template < class RightValueType>
@ -428,46 +419,6 @@ template <class TT> class Qualityd: public Quality<double, TT> {
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Qualityd"));TT::Name(name);}
};
/*-------------------------- Curvature ----------------------------------*/
/*! \brief \em Component: Per vertex basic \b curvature
This component keeps the mean an gaussian curvature for a vertex. Used by some of the algorithms of vcg::tri::UpdateCurvature to store the computed curvatures.
*/
template <class A, class TT> class Curvature: public TT {
public:
typedef Point2<A> CurvatureType;
typedef typename CurvatureType::ScalarType ScalarTypeCur;
const ScalarTypeCur &Kh() const { return _hk[0]; }
const ScalarTypeCur &Kg() const { return _hk[1]; }
ScalarTypeCur &Kh() { return _hk[0]; }
ScalarTypeCur &Kg() { return _hk[1]; }
ScalarTypeCur cKh() const { return _hk[0]; }
ScalarTypeCur cKg() const { return _hk[1]; }
template < class RightValueType>
void ImportData(const RightValueType & rVert ) {
if(rVert.IsCurvatureEnabled()) {
Kh() = rVert.cKh();
Kg() = rVert.cKg();
}
TT::ImportData( rVert);
}
static bool HasCurvature() { return true; }
static void Name(std::vector<std::string> & name){name.push_back(std::string("Curvature"));TT::Name(name);}
private:
Point2<A> _hk;
};
template <class T> class Curvaturef: public Curvature< float, T> {
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Curvaturef"));T::Name(name);}
};
template <class T> class Curvatured: public Curvature<double , T> {
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("Curvatured"));T::Name(name);}
};
/*-------------------------- Curvature Direction ----------------------------------*/
/*! \brief \em Component: Per vertex \b curvature \b directions

View File

@ -432,50 +432,6 @@ public:
};
///*-------------------------- CURVATURE ----------------------------------*/
template <class A, class TT> class CurvatureOcf: public TT {
public:
typedef Point2<A> CurvatureType;
typedef typename CurvatureType::ScalarType ScalarTypeCur;
ScalarTypeCur &Kh(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][0]; }
ScalarTypeCur &Kg(){ assert((*this).Base().CurvatureEnabled); return (*this).Base().CuV[(*this).Index()][1]; }
ScalarTypeCur cKh() const
{
assert((*this).Base().CurvatureEnabled);
return (*this).Base().CuV[(*this).Index()][0];
}
ScalarTypeCur cKg() const
{
assert((*this).Base().CurvatureEnabled);
return (*this).Base().CuV[(*this).Index()][1];
}
template <class RightVertexType>
void ImportData(const RightVertexType & rightV){
if((*this).IsCurvatureEnabled() && rightV.IsCurvatureEnabled())
{
(*this).Base().CuV[(*this).Index()][0] = rightV.cKh();
(*this).Base().CuV[(*this).Index()][1] = rightV.cKg();
}
TT::ImportData(rightV);
}
inline bool IsCurvatureEnabled( ) const
{
return this->Base().IsCurvatureEnabled();
}
static bool HasCurvature() { return true; }
static bool HasCurvatureOcf() { return true; }
};
template <class T> class CurvaturefOcf: public CurvatureOcf<float, T> {public: static void Name(std::vector<std::string> & name){name.push_back(std::string("CurvaturefOcf"));T::Name(name);} };
template <class T> class CurvaturedOcf: public CurvatureOcf<double, T> {public: static void Name(std::vector<std::string> & name){name.push_back(std::string("CurvaturedOcf"));T::Name(name);} };
///*-------------------------- CURVATURE DIR ----------------------------------*/
template <class S>