diff --git a/vcg/simplex/face/component.h b/vcg/simplex/face/component.h index 36b9fd79..cf2bb12d 100644 --- a/vcg/simplex/face/component.h +++ b/vcg/simplex/face/component.h @@ -267,6 +267,31 @@ private: NormalType _wnorm[3]; }; +template class WedgeRealNormal: public T { +public: + typedef A NormalType; + NormalType &WN(const int i) { return _wn[i]; } + NormalType const &cWN(const int i) const { return _wn[i]; } + template + void ImportLocal(const LeftF & leftF){ for (int i=0; i<3; ++i) { WN(i) = leftF.cWN(i); } T::ImportLocal(leftF);} + inline void Alloc(const int & ns){T::Alloc(ns);} + inline void Dealloc(){T::Dealloc();} + static bool HasWedgeNormal() { return true; } + static void Name(std::vector & name){name.push_back(std::string("WedgeRealNormal"));T::Name(name);} + +private: + NormalType _wn[3]; +}; + +template class WedgeRealNormal3s: public WedgeRealNormal { +public: static void Name(std::vector & name){name.push_back(std::string("WedgeRealNormal2s"));TT::Name(name);}}; + +template class WedgeRealNormal3f: public WedgeRealNormal { +public: static void Name(std::vector & name){name.push_back(std::string("WedgeRealNormal2f"));TT::Name(name);}}; + +template class WedgeRealNormal3d: public WedgeRealNormal { +public: static void Name(std::vector & name){name.push_back(std::string("WedgeRealNormal2d"));TT::Name(name);}}; + template class Normal3s: public NormalAbs { public:static void Name(std::vector & name){name.push_back(std::string("Normal3s"));T::Name(name);} @@ -371,7 +396,7 @@ public: ColorType &C() { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } const ColorType &cC() const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } ColorType &WC(const int) { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } - const ColorType &cWC(const int) { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } + const ColorType &cWC(const int) const { static ColorType dumcolor(vcg::Color4b::White); assert(0); return dumcolor; } QualityType &Q() { static QualityType dummyQuality(0); assert(0); return dummyQuality; } const QualityType &cQ() const { static QualityType dummyQuality(0); assert(0); return dummyQuality; }