Cleaned up various type name clashes. There were some components that wrongly re-defined <ScalarType> covering the real <ScalarType> of the simplex. Renamed to something less ambiguous (like CurScalarType for denoting the scalar type used inside curvature types).
This commit is contained in:
parent
4fbbfe4f86
commit
4198a3bd7c
|
@ -217,7 +217,7 @@ class TriMesh
|
|||
inline int HN() const { return hn; }
|
||||
|
||||
/// Bounding box of the mesh
|
||||
Box3<ScalarType> bbox;
|
||||
Box3<typename TriMesh::VertexType::CoordType::ScalarType> bbox;
|
||||
|
||||
/// Nomi di textures
|
||||
//
|
||||
|
|
|
@ -483,8 +483,8 @@ private:
|
|||
/*-------------------------- Curvature Direction ----------------------------------*/
|
||||
template <class S>
|
||||
struct CurvatureDirBaseType{
|
||||
typedef Point3<S> VecType;
|
||||
typedef S ScalarType;
|
||||
typedef Point3<S> CurVecType;
|
||||
typedef S CurScalarType;
|
||||
CurvatureDirBaseType () {}
|
||||
Point3<S>max_dir,min_dir; // max and min curvature direction
|
||||
S k1,k2;// max and min curvature values
|
||||
|
@ -493,18 +493,18 @@ struct CurvatureDirBaseType{
|
|||
template <class A, class TT> 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()) {
|
||||
|
|
|
@ -494,59 +494,59 @@ template <class T> class Normal3dOcf: public NormalOcf<vcg::Point3d, T> {};
|
|||
/*------------------------- CurvatureDir -----------------------------------------*/
|
||||
template <class S>
|
||||
struct CurvatureDirOcfBaseType{
|
||||
typedef Point3<S> VecType;
|
||||
typedef S ScalarType;
|
||||
typedef Point3<S> CurVecType;
|
||||
typedef S CurScalarType;
|
||||
CurvatureDirOcfBaseType () {}
|
||||
Point3<S>max_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 A, class T> 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;
|
||||
|
|
|
@ -428,12 +428,12 @@ public:
|
|||
template <class A, class TT> class CurvatureOcf: public TT {
|
||||
public:
|
||||
typedef Point2<A> 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 <class RightVertexType>
|
||||
void ImportData(const RightVertexType & rightV){
|
||||
|
@ -458,29 +458,29 @@ template <class T> class CurvaturedOcf: public CurvatureOcf<double, T> {public:
|
|||
|
||||
template <class S>
|
||||
struct CurvatureDirTypeOcf{
|
||||
typedef Point3<S> VecType;
|
||||
typedef S ScalarType;
|
||||
typedef Point3<S> CurVecType;
|
||||
typedef S CurScalarType;
|
||||
CurvatureDirTypeOcf () {}
|
||||
Point3<S>max_dir,min_dir;
|
||||
S k1,k2;
|
||||
CurVecType max_dir,min_dir;
|
||||
CurScalarType k1,k2;
|
||||
};
|
||||
|
||||
|
||||
template <class A, class TT> 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 <class RightVertexType>
|
||||
void ImportData(const RightVertexType & rightV){
|
||||
|
@ -513,7 +513,6 @@ public: static void Name(std::vector<std::string> & name){name.push_back(std::st
|
|||
template <class A, class TT> 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()];}
|
||||
|
|
Loading…
Reference in New Issue