Registered Member
|
How can i create a "Quaterniond from Matrix4d" and "Matrix4d from Quaterniond"?
Is there any "cast" or something like this? Else, How can i make it? Thank you. |
Moderator
|
you have to extract the linear part and be sure it represents a pure rotation, if so then you can do:
quat = mat44.topLeftCorner<3,3>(); otherwise you have to perform a polar decomposition to extract the rotational part: Matrix3d mat33; Afffine3d aff = mat44; aff.computeRotationScaling(&mat33, 0); quat = mat33; see: http://eigen.tuxfamily.org/dox/classEig ... 8581d23227 |
Registered Member
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]