I want to convert a matrix from Eigen::Matrix4f to Eigen::Affine3f Any one help?
Thanks
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;
© 2022 - 2024 — McMap. All rights reserved.