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

Fix handling unnormalized axis for (Pose)RotationAxisAngle #8341

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Dec 6, 2024

As well as dodging associated debug-assertions for

  • unnormalized/zero axis for rotation axis angle
  • non-invertible transforms (which may be the case for all sort of reasons)

@Wumpf Wumpf added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself include in changelog labels Dec 6, 2024
@Wumpf Wumpf changed the title fix handling unnormalized axis for (Pose)RotationAxisAngle Fix handling unnormalized axis for (Pose)RotationAxisAngle Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link
1ac4263 https://rerun.io/viewer/pr/8341

Note: This comment is updated whenever you push a commit.

if instance.world_from_mesh.matrix3.determinant() != 0.0 {
instance.world_from_mesh.matrix3.inverse().transpose()
} else {
glam::Mat3A::ZERO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure, you meant it to be zero and not identity?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. zero. Which is the most likely reason the determinant was zero to begin with 🤷

@Wumpf Wumpf merged commit f8bd31d into main Dec 6, 2024
37 of 39 checks passed
@Wumpf Wumpf deleted the andreas/fix-unnormalized-axis-rotation-handling branch December 6, 2024 14:20
Wumpf added a commit that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working include in changelog 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants