added eigen conversion to point2

This commit is contained in:
Luigi Malomo 2018-12-14 16:43:31 +01:00
parent b2bb45deb1
commit fdfb58cf7e
1 changed files with 12 additions and 0 deletions

View File

@ -301,6 +301,18 @@ public:
inline void Import( const Point2<T> & b )
{
_v[0] = b.X(); _v[1] = b.Y();
}
template <class EigenVector>
inline void FromEigenVector(const EigenVector & b)
{
_v[0] = ScalarType(b[0]);
_v[1] = ScalarType(b[1]);
}
template <class EigenVector>
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 <class T>