added ToEigenVector function to Point2 with templated return type
This commit is contained in:
parent
e9737e93f3
commit
5c21b15d36
|
@ -325,6 +325,14 @@ public:
|
|||
b[0]=_v[0];
|
||||
b[1]=_v[1];
|
||||
}
|
||||
template <class EigenVector>
|
||||
inline EigenVector ToEigenVector(void) const
|
||||
{
|
||||
assert(EigenVector::RowsAtCompileTime == 2);
|
||||
EigenVector b;
|
||||
b << _v[0], _v[1];
|
||||
return b;
|
||||
}
|
||||
/// constructs a 2D points from an existing one of different type
|
||||
template <class T>
|
||||
static Point2 Construct( const Point2<T> & b )
|
||||
|
|
Loading…
Reference in New Issue