In my OpenGL I want to use a left handed coordinate system for the model space but a right handed for the view space. That's because if I think of me as the origin of the coordinate system:
- for me it is common that thigs that are far away and in front of me have a positiv z koordinate so I have to use a left handed coordinate system in model view
- if I walk back I can put
z -= 1
in thesetLookAtM
method which creates my view matrix and it is common that if I walk back I have to subtract the z value if I go backwards
I use these functions from android.OpenGL.Matrix
to create my view and projection matrix:
Matrix.setLookAtM(data, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0);
Matrix.perspectiveM(projection, 45, width / height, 1f, 50f);
What can i do / what do I have to change to get the result discribed above so that the z axis for models points into the screen but the z axis for the camera points out of the screen?
If this is not possible with this two matrixes I have to live with it as it is now because I do not want to applay a new operation to each modelMatrix each time I render the object because of time.