-
Notifications
You must be signed in to change notification settings - Fork 94
Add support for QQuaternion #1314
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1314 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 75 75
Lines 13038 13038
=========================================
Hits 13038 13038 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
thank you @jnbooth ! Really appreciate it :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jnbooth, thank you for for the contribution. Again, please excuse the delayed review.
The QQuaternion looks good. QGenericMatrix still has some room for improvement.
| /// The QGenericMatrix class represents a quaternion consisting of a vector and scalar. | ||
| /// | ||
| /// Qt Documentation: [QGenericMatrix](https://doc.qt.io/qt/qgenericmatrix.html#details) | ||
| #[repr(transparent)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #[repr(transparent)] | |
| #[repr(C)] |
I think this needs to be repr(C), as otherwise it's not necessarily guaranteed that the layout matches the layout in C++, even with repr(transparent).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is for its layout to be that of [[f32; M]; N], rather than a struct with one [[f32; M]; N] member.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in C++ it is a struct with one [[f32; M]; N] member, right? And the goal is to be bit-for-bit compatible with that struct...
Co-authored-by: Leon Matthes <[email protected]>
…entity Co-authored-by: Leon Matthes <[email protected]>
…aw_parts" This reverts commit 5a53669.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just noticed the #[repr(..)] discussion is still unresolved.
Closes #1308.