Corrected a very nasty bug introduced in Revision 4782 that reorganized ocf face component and added a standard interface for query the availabiilty of data:
bool FaceType::IsXXXAvaialble() ,must be defined in the XXX ocf type and not in the info type otherwise it would be defined also for non ocf components.
This commit is contained in:
parent
bdab65e067
commit
8111bcda24
|
@ -408,6 +408,11 @@ public:
|
||||||
return (*this).Base().AV[(*this).Index()]._zp[j];
|
return (*this).Base().AV[(*this).Index()]._zp[j];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char cVFi(const int j) const {
|
||||||
|
assert((*this).Base().VFAdjacencyEnabled);
|
||||||
|
return (*this).Base().AV[(*this).Index()]._zp[j];
|
||||||
|
}
|
||||||
|
|
||||||
template <class RightFaceType>
|
template <class RightFaceType>
|
||||||
void ImportData(const RightFaceType & rightF){
|
void ImportData(const RightFaceType & rightF){
|
||||||
T::ImportData(rightF);
|
T::ImportData(rightF);
|
||||||
|
@ -461,6 +466,7 @@ public:
|
||||||
template <class A, class T> class NormalOcf: public T {
|
template <class A, class T> class NormalOcf: public T {
|
||||||
public:
|
public:
|
||||||
typedef A NormalType;
|
typedef A NormalType;
|
||||||
|
inline bool IsNormalEnabled( ) const { return this->Base().IsNormalEnabled(); }
|
||||||
static bool HasNormal() { return true; }
|
static bool HasNormal() { return true; }
|
||||||
static bool HasNormalOcf() { return true; }
|
static bool HasNormalOcf() { return true; }
|
||||||
|
|
||||||
|
@ -501,6 +507,7 @@ public:
|
||||||
typedef typename CurvatureDirType::VecType VecType;
|
typedef typename CurvatureDirType::VecType VecType;
|
||||||
typedef typename CurvatureDirType::ScalarType ScalarType;
|
typedef typename CurvatureDirType::ScalarType ScalarType;
|
||||||
|
|
||||||
|
inline bool IsCurvatureDirEnabled( ) const { return this->Base().IsCurvatureDirEnabled(); }
|
||||||
static bool HasCurvatureDir() { return true; }
|
static bool HasCurvatureDir() { return true; }
|
||||||
static bool HasCurvatureDirOcf() { return true; }
|
static bool HasCurvatureDirOcf() { return true; }
|
||||||
|
|
||||||
|
@ -584,6 +591,7 @@ public:
|
||||||
Q() = rightF.cQ();
|
Q() = rightF.cQ();
|
||||||
T::ImportData(rightF);
|
T::ImportData(rightF);
|
||||||
}
|
}
|
||||||
|
inline bool IsQualityEnabled( ) const { return this->Base().IsQualityEnabled(); }
|
||||||
static bool HasQuality() { return true; }
|
static bool HasQuality() { return true; }
|
||||||
static bool HasQualityOcf() { return true; }
|
static bool HasQualityOcf() { return true; }
|
||||||
};
|
};
|
||||||
|
@ -609,6 +617,7 @@ public:
|
||||||
C() = rightF.cC();
|
C() = rightF.cC();
|
||||||
T::ImportData(rightF);
|
T::ImportData(rightF);
|
||||||
}
|
}
|
||||||
|
inline bool IsColorEnabled() const { return this->Base().IsColorEnabled();}
|
||||||
static bool HasColor() { return true; }
|
static bool HasColor() { return true; }
|
||||||
static bool HasColorOcf() { return true; }
|
static bool HasColorOcf() { return true; }
|
||||||
};
|
};
|
||||||
|
@ -633,6 +642,7 @@ public:
|
||||||
IMark() = rightF.cIMark();
|
IMark() = rightF.cIMark();
|
||||||
T::ImportData(rightF);
|
T::ImportData(rightF);
|
||||||
}
|
}
|
||||||
|
inline bool IsMarkEnabled( ) const { return this->Base().IsMarkEnabled(); }
|
||||||
static bool HasMark() { return true; }
|
static bool HasMark() { return true; }
|
||||||
static bool HasMarkOcf() { return true; }
|
static bool HasMarkOcf() { return true; }
|
||||||
inline void InitIMark() { IMark() = 0; }
|
inline void InitIMark() { IMark() = 0; }
|
||||||
|
@ -651,6 +661,7 @@ public:
|
||||||
{ WT(0) = rightF.cWT(0); WT(1) = rightF.cWT(1); WT(2) = rightF.cWT(2); }
|
{ WT(0) = rightF.cWT(0); WT(1) = rightF.cWT(1); WT(2) = rightF.cWT(2); }
|
||||||
TT::ImportData(rightF);
|
TT::ImportData(rightF);
|
||||||
}
|
}
|
||||||
|
inline bool IsWedgeTexCoordEnabled( ) const { return this->Base().IsWedgeTexCoordEnabled(); }
|
||||||
static bool HasWedgeTexCoord() { return true; }
|
static bool HasWedgeTexCoord() { return true; }
|
||||||
static bool HasWedgeTexCoordOcf() { return true; }
|
static bool HasWedgeTexCoordOcf() { return true; }
|
||||||
};
|
};
|
||||||
|
@ -670,6 +681,7 @@ public:
|
||||||
{ WC(0) = rightF.cWC(0); WC(1) = rightF.cWC(1); WC(2) = rightF.cWC(2); }
|
{ WC(0) = rightF.cWC(0); WC(1) = rightF.cWC(1); WC(2) = rightF.cWC(2); }
|
||||||
TT::ImportData(rightF);
|
TT::ImportData(rightF);
|
||||||
}
|
}
|
||||||
|
inline bool IsWedgeColorEnabled( ) const { return this->Base().IsWedgeColorEnabled(); }
|
||||||
static bool HasWedgeColor() { return true; }
|
static bool HasWedgeColor() { return true; }
|
||||||
static bool HasWedgeColorOcf() { return true; }
|
static bool HasWedgeColorOcf() { return true; }
|
||||||
};
|
};
|
||||||
|
@ -689,6 +701,7 @@ public:
|
||||||
{ WN(0) = rightF.cWN(0); WN(1) = rightF.cWN(1); WN(2) = rightF.cWN(2); }
|
{ WN(0) = rightF.cWN(0); WN(1) = rightF.cWN(1); WN(2) = rightF.cWN(2); }
|
||||||
TT::ImportData(rightF);
|
TT::ImportData(rightF);
|
||||||
}
|
}
|
||||||
|
inline bool IsWedgeNormalEnabled( ) const { return this->Base().IsWedgeNormalEnabled(); }
|
||||||
static bool HasWedgeNormal() { return true; }
|
static bool HasWedgeNormal() { return true; }
|
||||||
static bool HasWedgeNormalOcf() { return true; }
|
static bool HasWedgeNormalOcf() { return true; }
|
||||||
};
|
};
|
||||||
|
@ -723,15 +736,7 @@ public:
|
||||||
static bool HasFFAdjacencyOcf() { return false; }
|
static bool HasFFAdjacencyOcf() { return false; }
|
||||||
static bool HasVFAdjacencyOcf() { return false; }
|
static bool HasVFAdjacencyOcf() { return false; }
|
||||||
|
|
||||||
inline bool IsColorEnabled() const { return _ovp->IsColorEnabled();}
|
|
||||||
inline bool IsCurvatureDirEnabled( ) const { return _ovp->IsCurvatureDirEnabled(); }
|
|
||||||
inline bool IsMarkEnabled( ) const { return _ovp->IsMarkEnabled(); }
|
|
||||||
inline bool IsNormalEnabled( ) const { return _ovp->IsNormalEnabled(); }
|
|
||||||
inline bool IsQualityEnabled( ) const { return _ovp->IsQualityEnabled(); }
|
|
||||||
|
|
||||||
inline bool IsWedgeColorEnabled( ) const { return _ovp->IsWedgeColorEnabled(); }
|
|
||||||
inline bool IsWedgeNormalEnabled( ) const { return _ovp->IsWedgeNormalEnabled(); }
|
|
||||||
inline bool IsWedgeTexCoordEnabled( ) const { return _ovp->IsWedgeTexCoordEnabled(); }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -291,7 +291,7 @@ public:
|
||||||
|
|
||||||
static bool HasVFAdjacency() { return true; }
|
static bool HasVFAdjacency() { return true; }
|
||||||
static bool HasVFAdjacencyOcf() { return true; }
|
static bool HasVFAdjacencyOcf() { return true; }
|
||||||
static bool IsVFAdjacencyEnabled(const typename T::VertexType *vp) {return vp->Base().VFAdjacencyEnabled;}
|
bool IsVFAdjacencyEnabled(const typename T::VertexType *vp) {return vp->Base().VFAdjacencyEnabled;}
|
||||||
|
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("VFAdjOcf"));T::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("VFAdjOcf"));T::Name(name);}
|
||||||
private:
|
private:
|
||||||
|
@ -302,6 +302,7 @@ private:
|
||||||
template <class A, class T> class NormalOcf: public T {
|
template <class A, class T> class NormalOcf: public T {
|
||||||
public:
|
public:
|
||||||
typedef A NormalType;
|
typedef A NormalType;
|
||||||
|
inline bool IsNormalEnabled( ) const { return this->Base().IsNormalEnabled(); }
|
||||||
static bool HasNormal() { return true; }
|
static bool HasNormal() { return true; }
|
||||||
static bool HasNormalOcf() { return true; }
|
static bool HasNormalOcf() { return true; }
|
||||||
|
|
||||||
|
@ -336,6 +337,7 @@ public:
|
||||||
T::ImportData(rightV);
|
T::ImportData(rightV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsColorEnabled() const { return this->Base().IsColorEnabled();}
|
||||||
static bool HasColor() { return true; }
|
static bool HasColor() { return true; }
|
||||||
static bool HasColorOcf() { assert(!T::HasColorOcf()); return true; }
|
static bool HasColorOcf() { assert(!T::HasColorOcf()); return true; }
|
||||||
};
|
};
|
||||||
|
@ -359,6 +361,7 @@ public:
|
||||||
Q() = rightV.cQ();
|
Q() = rightV.cQ();
|
||||||
T::ImportData(rightV);
|
T::ImportData(rightV);
|
||||||
}
|
}
|
||||||
|
inline bool IsQualityEnabled( ) const { return this->Base().IsQualityEnabled(); }
|
||||||
static bool HasQuality() { return true; }
|
static bool HasQuality() { return true; }
|
||||||
static bool HasQualityOcf() { assert(!T::HasQualityOcf()); return true; }
|
static bool HasQualityOcf() { assert(!T::HasQualityOcf()); return true; }
|
||||||
};
|
};
|
||||||
|
@ -383,6 +386,7 @@ public:
|
||||||
T() = rightV.cT();
|
T() = rightV.cT();
|
||||||
TT::ImportData(rightV);
|
TT::ImportData(rightV);
|
||||||
}
|
}
|
||||||
|
inline bool IsTexCoordEnabled( ) const { return this->Base().IsTexCoordEnabled(); }
|
||||||
static bool HasTexCoord() { return true; }
|
static bool HasTexCoord() { return true; }
|
||||||
static bool HasTexCoordOcf() { assert(!TT::HasTexCoordOcf()); return true; }
|
static bool HasTexCoordOcf() { assert(!TT::HasTexCoordOcf()); return true; }
|
||||||
};
|
};
|
||||||
|
@ -407,6 +411,7 @@ public:
|
||||||
IMark() = rightV.cIMark();
|
IMark() = rightV.cIMark();
|
||||||
T::ImportData(rightV);
|
T::ImportData(rightV);
|
||||||
}
|
}
|
||||||
|
inline bool IsMarkEnabled( ) const { return this->Base().IsMarkEnabled(); }
|
||||||
static bool HasMark() { return true; }
|
static bool HasMark() { return true; }
|
||||||
static bool HasMarkOcf() { return true; }
|
static bool HasMarkOcf() { return true; }
|
||||||
inline void InitIMark() { IMark() = 0; }
|
inline void InitIMark() { IMark() = 0; }
|
||||||
|
@ -437,6 +442,7 @@ public:
|
||||||
TT::ImportData(rightV);
|
TT::ImportData(rightV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsCurvatureEnabled( ) const { return this->Base().IsCurvatureDirEnabled(); }
|
||||||
static bool HasCurvature() { return true; }
|
static bool HasCurvature() { return true; }
|
||||||
static bool HasCurvatureOcf() { return true; }
|
static bool HasCurvatureOcf() { return true; }
|
||||||
};
|
};
|
||||||
|
@ -484,6 +490,8 @@ public:
|
||||||
}
|
}
|
||||||
TT::ImportData(rightV);
|
TT::ImportData(rightV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsCurvatureDirEnabled( ) const { return this->Base().IsCurvatureDirEnabled(); }
|
||||||
static bool HasCurvatureDir() { return true; }
|
static bool HasCurvatureDir() { return true; }
|
||||||
static bool HasCurvatureDirOcf() { return true; }
|
static bool HasCurvatureDirOcf() { return true; }
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("CurvatureDirOcf"));TT::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("CurvatureDirOcf"));TT::Name(name);}
|
||||||
|
@ -516,6 +524,7 @@ public:
|
||||||
TT::ImportData(rightV);
|
TT::ImportData(rightV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsRadiusEnabled( ) const { return this->Base().IsRadiusEnabled(); }
|
||||||
static bool HasRadius() { return true; }
|
static bool HasRadius() { return true; }
|
||||||
static bool HasRadiusOcf() { return true; }
|
static bool HasRadiusOcf() { return true; }
|
||||||
static void Name(std::vector<std::string> & name){name.push_back(std::string("RadiusOcf")); TT::Name(name);}
|
static void Name(std::vector<std::string> & name){name.push_back(std::string("RadiusOcf")); TT::Name(name);}
|
||||||
|
@ -554,16 +563,6 @@ public:
|
||||||
static bool HasRadiusOcf() { return false; }
|
static bool HasRadiusOcf() { return false; }
|
||||||
static bool HasTexCoordOcf() { return false; }
|
static bool HasTexCoordOcf() { return false; }
|
||||||
static bool HasVFAdjacencyOcf() { return false; }
|
static bool HasVFAdjacencyOcf() { return false; }
|
||||||
|
|
||||||
inline bool IsColorEnabled() const { return _ovp->IsColorEnabled();}
|
|
||||||
inline bool IsCurvatureEnabled( ) const { return _ovp->IsCurvatureDirEnabled(); }
|
|
||||||
inline bool IsCurvatureDirEnabled( ) const { return _ovp->IsCurvatureDirEnabled(); }
|
|
||||||
inline bool IsMarkEnabled( ) const { return _ovp->IsMarkEnabled(); }
|
|
||||||
inline bool IsNormalEnabled( ) const { return _ovp->IsNormalEnabled(); }
|
|
||||||
inline bool IsQualityEnabled( ) const { return _ovp->IsQualityEnabled(); }
|
|
||||||
inline bool IsRadiusEnabled( ) const { return _ovp->IsRadiusEnabled(); }
|
|
||||||
inline bool IsTexCoordEnabled( ) const { return _ovp->IsTexCoordEnabled(); }
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue