[Extended!] question - multiple possible axis

Started by
1 comment, last by _goat 18 years ago
If I want to allow any "alignment" of axis to be mapped to another arbitary set of axis (such as OpenGL's Right-Handed system or DX's LH), I do the calculations in the projection matrix, right? I can handle the math myself, but I just want to make sure I'm putting it in the right spot. Example just in case I'm a bad communicater: Someone is writing a program with (say "forwards" is looking into the screen), eg, the Z axis pointing up, the -X axis pointing "right" and the Y axis pointing forwards. To get this to OpenGL's (Y up, X right, -Z forwards), I could (and would/should) put the necessary rotation in the projection matrix (on creation). Yeah? [Edited by - _goat on April 17, 2006 1:40:10 AM]
[ search: google ][ programming: msdn | boost | opengl ][ languages: nihongo ]
Advertisement
I've always reconciled the difference in coordinate systems in my view matrix, however you can just as well apply it to your projection matrix. Changing coordinate systems is just another transformation. But I think you have to do it before the actual projection, since the projection transformation isn't orthogonal.
So, I'm still confident I could handle the maths myself, but it's looking a lot trickier than I originally thought, and I'm confident that I'd end up doing it, well, sub-par. Does anyone have a good algorithm (psuedocode for sure) for doing this? Calculating the rotations/mirrors should be no problem, it's just finding out what those tranforms should be.

Thanks in advance.
[ search: google ][ programming: msdn | boost | opengl ][ languages: nihongo ]

This topic is closed to new replies.

Advertisement