boostorg / qvm

Boost Quaternions, Vectors, Matrices library
Boost Software License 1.0
81 stars 45 forks source link

Is there no support for rotation by Euler angles? #9

Closed agate-pris closed 6 years ago

agate-pris commented 6 years ago

Boost.QVM does not seem to support rotation by Euler angles.

I think that following overload should be added.

Function template euler_angles should be added that convert quaternion to 3-dimensional vector type. It probably use zero_magnitude_error.

If you like, I will fork, implement it and send a pull request.

zajo commented 6 years ago

I've implemented this for matrices, both for Tait–Bryan angles and Euler angles.

agate-pris commented 6 years ago

Thank you.

ianjosephfischer commented 2 years ago

Is this method implemented. I would love a euler_angles method or is it named something else?

zajo commented 2 years ago

See:

ianjosephfischer commented 2 years ago

Thank you for the response, but was hoping to either extract the euler angles from a matrix or a quaternion. These methods seems to only apply euler angles to the matrices.

zajo commented 2 years ago

Right, that's what this issue was about. There is a conversion of matrix to a quaternion, if that helps: https://boostorg.github.io/qvm/#quat_convert_to.