From 6d2f4225dd8b2f9149431a01fc5d6aff74eb189d Mon Sep 17 00:00:00 2001 From: Luigi Malomo Date: Mon, 23 Nov 2020 16:49:40 +0100 Subject: [PATCH] added ToEigenVector functions to Point4 --- vcg/space/deprecated_point4.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vcg/space/deprecated_point4.h b/vcg/space/deprecated_point4.h index a27d9263..a932f43d 100644 --- a/vcg/space/deprecated_point4.h +++ b/vcg/space/deprecated_point4.h @@ -121,6 +121,22 @@ public: _v[2] = T(b[2]); _v[3] = T(b[3]); } + template + inline void ToEigenVector( EigenVector & b ) const + { + b[0]=_v[0]; + b[1]=_v[1]; + b[2]=_v[2]; + b[3]=_v[3]; + } + template + inline EigenVector ToEigenVector(void) const + { + assert(EigenVector::RowsAtCompileTime == 4); + EigenVector b; + b << _v[0], _v[1], _v[2], _v[3]; + return b; + } /// constructor that imports from different Point4 types template static inline Point4 Construct( const Point4 & b )