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

Add Mat/Affine minor method #325

Open
bitshifter opened this issue Aug 17, 2022 Discussed in #323 · 0 comments
Open

Add Mat/Affine minor method #325

bitshifter opened this issue Aug 17, 2022 Discussed in #323 · 0 comments

Comments

@bitshifter
Copy link
Owner

Discussed in #323

Originally posted by Demiu August 15, 2022
Hello, while working with 2D/3D transformation using matrices I felt a certain transformation was missing. There is no ergonomic way to turn a matrix for 3D transformation (Mat4) into a matrix for 2D transformation (Mat3) preserving the translation; for example cut off Z off a Mat4, so remove 3rd column and 3rd row. Same thing is missing from the Affine types.

I think it would be a good convenience function

Add a minor method to support this use case.

One catch is supporting both Mat3 and Mat3A. For this case from_minor(Mat4) could be used, but that doesn't work so well for the Mat2 case, also, minor as a method feels nicer though.

@bitshifter bitshifter changed the title Add Mat/Affine minor Add Mat/Affine minor method Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant