diff --git a/vcg/space/deprecated_point2.h b/vcg/space/deprecated_point2.h index b93b49af..c95789a4 100644 --- a/vcg/space/deprecated_point2.h +++ b/vcg/space/deprecated_point2.h @@ -301,6 +301,18 @@ public: inline void Import( const Point2 & b ) { _v[0] = b.X(); _v[1] = b.Y(); + } + template + inline void FromEigenVector(const EigenVector & b) + { + _v[0] = ScalarType(b[0]); + _v[1] = ScalarType(b[1]); + } + template + inline void ToEigenVector(EigenVector & b) const + { + b[0]=_v[0]; + b[1]=_v[1]; } /// constructs a 2D points from an existing one of different type template