added EmptyCurvatureData and EmptyRadius

This commit is contained in:
ganovelli 2008-10-14 16:45:36 +00:00
parent 8198cf4c8b
commit c454c38e60
1 changed files with 47 additions and 0 deletions

View File

@ -363,6 +363,35 @@ 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);}
};
template <class TT> class EmptyCurvatureData:public TT {
public:
typedef float ScalarType;
typedef Point3f VecType;
float &Kh() {static float dummy = 0.f; assert(0);return dummy;;}
float &Kg() { static float dummy = 0.f; assert(0);return dummy;}
const float &cKh() const {static float dummy = 0.f; assert(0);return dummy;;}
const float &cKg()const { static float dummy = 0.f;assert(0); return dummy;}
VecType &PD1(){static VecType v(0,0,0); assert(0);return v;}
VecType &PD2(){static VecType v(0,0,0); assert(0);return v;}
const VecType &cPD1() const {static VecType v(0,0,0); assert(0);return v;}
const VecType &cPD2() const {static VecType v(0,0,0); assert(0);return v;}
ScalarType &K1(){ static ScalarType v = 0.0;assert(0);return v;}
ScalarType &K2(){ static ScalarType v = 0.0;assert(0);return v;}
const ScalarType &cK1() const {static ScalarType v = 0.0;assert(0);return v;}
const ScalarType &cK2()const {static ScalarType v = 0.0;assert(0);return v;}
static bool HasCurvatureOcc() { return false; }
static bool HasCurvatureOcf() { return false; }
static bool HasCurvature() { return false; }
static bool HasCurvatureDir() { return false; }
static void Name(std::vector<std::string> & name){TT::Name(name);}
};
/*-------------------------- Curvature ----------------------------------*/
template <class TT> class EmptyCurvature: public TT {
@ -464,6 +493,24 @@ template <class T> class CurvatureDird: public CurvatureDir<CurvatureDirBaseType
public: static void Name(std::vector<std::string> & name){name.push_back(std::string("CurvatureDird"));T::Name(name);}
};
/*-------------------------- Empty Radius ----------------------------------*/
template <class T> class EmptyRadius: public T {
public:
typedef float RadiusType;
typedef RadiusType ScalarType;
RadiusType &R(){ static ScalarType v = 0.0; assert(0); return v; }
const RadiusType &cR() const { static const ScalarType & v = 0.0; assert(0); return v; }
static bool HasRadius() { return true; }
static bool HasRadiusOcf() { return true; }
static void Name(std::vector<std::string> & name){ T::Name(name);}
};
/*----------------------------- VEADJ ------------------------------*/