# [Extended!] question - multiple possible axis

This topic is 4626 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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 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.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633735
• Total Posts
3013592
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!