From c454c38e60226c771fe3563c13c0d81d2933e2ef Mon Sep 17 00:00:00 2001 From: ganovelli Date: Tue, 14 Oct 2008 16:45:36 +0000 Subject: [PATCH] added EmptyCurvatureData and EmptyRadius --- vcg/simplex/vertexplus/component.h | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/vcg/simplex/vertexplus/component.h b/vcg/simplex/vertexplus/component.h index 355ef0a3..7a65dc3e 100644 --- a/vcg/simplex/vertexplus/component.h +++ b/vcg/simplex/vertexplus/component.h @@ -363,6 +363,35 @@ template class Qualityd: public Quality { public: static void Name(std::vector & name){name.push_back(std::string("Qualityd"));TT::Name(name);} }; + + +template 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 & name){TT::Name(name);} +}; + /*-------------------------- Curvature ----------------------------------*/ template class EmptyCurvature: public TT { @@ -464,6 +493,24 @@ template class CurvatureDird: public CurvatureDir & name){name.push_back(std::string("CurvatureDird"));T::Name(name);} }; +/*-------------------------- Empty Radius ----------------------------------*/ + +template 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 & name){ T::Name(name);} +}; + + + /*----------------------------- VEADJ ------------------------------*/