Hey, I’m relatively new to rust so excuse the noob questions.
I’m writing a basic rendering engine with gfx-rs and nalgebra, and I’m having issues getting transformations to compose how I expect them to. The user guide says: “Transformations can be composed (by multiplication) even if they do not have the same type”
However, I get errors when I try to multiply a Perspective3 by a Translation3 (or vice versa), but it seems like Perspective3 should be Projective, which should be able to be composed with a Translation. I’ve gotten past that by using to_homogenous, but that feels un-idiomatic because I’m losing the type metadata on the class of transformation I’m using.
Additionally, I’m now using a UnitQuaternion to represent view rotation, and I can’t figure out how to turn that into a rotation matrix that I can compose with a Translation and Perspective.
What’s the correct way to do this stuff?