From dee3de3cc8f4ec28c384cb64d1c46ece3eff8551 Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 1 Nov 2011 18:33:52 +0000 Subject: [PATCH] Added correct overloading of ImportData for per vertex curvature component. --- vcg/simplex/vertex/component.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vcg/simplex/vertex/component.h b/vcg/simplex/vertex/component.h index f1225ba6..9f33b809 100644 --- a/vcg/simplex/vertex/component.h +++ b/vcg/simplex/vertex/component.h @@ -389,8 +389,16 @@ public: ScalarType &K2(){ return _curv.k2;} const ScalarType &cK1() const {return _curv.k1;} const ScalarType &cK2()const {return _curv.k2;} + template < class LeftV> + void ImportData(const LeftV & left ) { + if(LeftV::HasCurvatureDir()) { + PD1() = left.cPD1(); PD2() = left.cPD2(); + K1() = left.cK1(); K2() = left.cK2(); + } + TT::ImportData( left); + } - static bool HasCurvatureDir() { return true; } + static bool HasCurvatureDir() { return true; } static void Name(std::vector & name){name.push_back(std::string("CurvatureDir"));TT::Name(name);} private: