-
Notifications
You must be signed in to change notification settings - Fork 155
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
Remove Rotation and Transform traits #302
Conversation
44480e9
to
efc00c0
Compare
I'm obviously not too happy about the |
I'll think about this some more. I think some common traits would be useful, but I definitely don't want to leave it in its current state. Have you been leaning on these heavily? |
I've been using Of course, |
Cheers, thanks for showing me! |
I would support a redesign here - my experiences using cgmath have been positive, except for the fact that it feels like I often need to import several traits from the library just to get the expected basic functionality from a math library. I've started just including I support this also because I recently ran into a big rat's nest when I needed to combine a rotation ( let translation = Matrix4::from_translation(object_position);
// Matrix3::from_rotation(x: Basis3) would be useful here:
let rotation: Matrix3<T> = object_rotation.into();
// Matrix4::from(object_rotation.into()) would fail here:
translation * Matrix4::from(rotation) // -> final matrix The downside of removing the |
Note that I've also added |
Is this still being considered? I'd rather see it refactored rather than removed. What about only removing the traits and renaming/refactoring the structs? Perhaps rename Decomposed to Transform{2|3} and move the trait functions from both
|
I'm actually thinking of going with |
One tricky thing is Matrices are can be treated interpreted in different ways. A |
@nbennet if you move the transform functions into the struct that comes from @bjz is this a problem though? Just implement both |
@kvark I don't disagree about the abstraction. I was only suggesting an alternative in order to prevent them from being removed entirely. |
Closes #143, #194
Given the interactions on IRC, they cause more confusion than perhaps they are worth. Perhaps we can re-add them in the future with a better API, but for now I would like to focus more on simplicity.
The following traits and types have been removed:
Rotation
,Rotation2
,Rotation3
,Basis3
,Basis3
Transform
,Transform2
,Transform3
,Decomposed
,AffineMatrix3