added eigen conversion to point2
This commit is contained in:
parent
b2bb45deb1
commit
fdfb58cf7e
|
@ -301,6 +301,18 @@ public:
|
||||||
inline void Import( const Point2<T> & b )
|
inline void Import( const Point2<T> & b )
|
||||||
{
|
{
|
||||||
_v[0] = b.X(); _v[1] = b.Y();
|
_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
|
/// constructs a 2D points from an existing one of different type
|
||||||
template <class T>
|
template <class T>
|
||||||
|
|
Loading…
Reference in New Issue