Registered Member
|
Hi,
I'm supposed to apply a clustering algorithm to some object transformations. I have to feed my clustering algorithm with the transformations translation and rotation. Is it possible (or what is the best way) to retrieve the rotation part of a Affine3f transformation as a quaternion? I have to use the rotation as a quaternion because they are stable and compact. Thank you Cheers |
Moderator
|
there is a computeRotation method in Transform<> (i.e., Affine3f) which gives you a rotation matrix that you can then convert to a Quaternion using Quaternionf(rot), or quat = rot; ...
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]