-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add extrinsic euler rotations #337
Comments
Hi @carbotaniuman , could you provide a bit more details here, I'm not totally clear on what you are asking for. |
I was looking for extrinsic rotations, which was used for a visualization in the field I was working in. There's basically the extrinsic counterpart to the intrinsic rotations already present https://docs.rs/glam/latest/glam/enum.EulerRot.html, and according to https://pages.github.berkeley.edu/EECS-106/fa21-site/assets/discussions/D1_Rotations_soln.pdf
|
Speculatively, what might an API for this look like in glam? |
It would just be adding the new variants to this enum https://docs.rs/glam/latest/glam/enum.EulerRot.html, and handling them in the euler angle conversion code. I'm fairly confident that what I said in the first paragraph was an implementation technique where you map it to the intrinsic one and then swap some params, but it's been years since I looked at this so I don't really remember. |
Extrinsic rotations can be implemented by calling the intrinsic rotation with the first and last elements swapped and then manually swapping the elements, and would prove useful when interfacing with OpenCV.
EXTRINSIC_XYZ[0] = INTRINSIC_ZYX[2]
EXTRINSIC_XYZ[1] = INTRINSIC_ZYX[1]
EXTRINSIC_XYZ[2] = INTRINSIC_ZYX[0]
The text was updated successfully, but these errors were encountered: