Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension for Euler angles #744

Merged

Conversation

vitali-parkhomenko
Copy link

@vitali-parkhomenko vitali-parkhomenko commented Mar 19, 2018

This PR adds the following:

  • Creates the derived matrix from the rotation matrix about the X-, Y-, and Z-axis
  • Creates the rotation matrix from the Euler angles (intrinsic rotations):
    Proper Euler angles (z-x-z, x-y-x, y-z-y, z-y-z, x-z-x, y-x-y)
    Tait–Bryan angles (y-z-x, z-x-y, x-z-y, z-y-x).
  • Extracts the Euler angles from the rotation matrix (intrinsic rotations):
    Proper Euler angles (z-x-z, x-y-x, y-z-y, z-y-z, x-z-x, y-x-y)
    Tait–Bryan angles (y-z-x, z-x-y, x-z-y, z-y-x, y-x-z).
  • Tests for these features

Creating a derived matrix from the rotation matrix about the x-, y-, and z-axis.
Creating a rotation matrix for 10 sequences of rotation axes:
z-x-z, x-y-x, y-z-y, z-y-z, x-z-x, y-x-y, y-z-x, z-x-y, x-z-y, z-y-x.
Extraction of Euler angles from rotation matrix for 11 sequences of rotation axes:
z-x-z, x-y-x, y-z-y, z-y-z, x-z-x, y-x-y, y-z-x, z-x-y, x-z-y, z-y-x, y-x-z.
@Groovounet
Copy link
Member

Would you consider adding tests for these features?

@vitali-parkhomenko
Copy link
Author

Of course, only this will take a little bit more time.

@Groovounet
Copy link
Member

Perfect! It would be great because otherwise features tend to just die.

Thanks!

@vitali-parkhomenko
Copy link
Author

I added the tests for the feature. If it's okay, it's also possible to add these tests for the Euler angles feature, that is not related to this pull request, but is not covered by tests now.
I mean, if you are satisfied with these tests, I can do it for glm::eulerAngleXYZ, glm::eulerAngleYXZ and glm::extractEulerAngleXYZ.

@recp
Copy link

recp commented Mar 24, 2018

May I ask properties of these euler angles;

  • Tait–Bryan angles?
  • Intrinsic or extrinsic rotations?

Thanks

@vitali-parkhomenko
Copy link
Author

@recp Thanks for the questions!

  • If you mean the sequences Tait–Bryan angles then in this pull request they are also present.
  • Intrinsic rotations.

@recp
Copy link

recp commented Mar 25, 2018

Thank you for answering my questions;

It seems I implemented euler angles in reverse order in cglm which makes them extrinsic, I'll fix that asap. This is why I asked "intrinsic or extrinsic rotations". I'll also ask to Blender group what conventions they use.

I think the rotation conventions must present in documentation to help others

@Groovounet Groovounet merged commit fdb0e43 into g-truc:master Mar 25, 2018
@Groovounet
Copy link
Member

Thanks for contributing!

@Groovounet Groovounet added this to the GLM 0.9.9 milestone Mar 25, 2018
@Groovounet Groovounet self-assigned this Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants