I want to convert a matrix from Eigen::Matrix4f to Eigen::Affine3f Any one help?
Thanks
Eigen::Affine3f
is a typedef of Eigen::Transform<float, 3, Eigen::Affine>
.
According to the reference, the type has a member function MatrixType & matrix ()
which gives you matrix interface.
Eigen::Matrix4f a;
Eigen::Affine3f b;
b.matrix() = a;
operator=
will do:
Matrix4f M;
Affine3f F;
F = M;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With