Sign in to follow this  
_goat

[Extended!] question - multiple possible axis

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this