Changing up vector used by OpenGL
For the life of me I can''t find anywhere in the man pages for OpenGL how to setup OpenGL to use the Z-axis as the up vector instead of the Y-axis. Does anybody know how to do this?
Thanks,
LoCo3D
gluLook( xpos, ypos, zpos, xeye, yeye, zeye, 0.0, 0.0, 1.0)
?
The last 3 params specify the Up Vector for the camera...
Is this what you mean?
?
The last 3 params specify the Up Vector for the camera...
Is this what you mean?
Now why would you wanna do that? Are you trying to write some kind of a mathematical program where it really matters what you call an axis.
Rotate the space around the X-axis by 90 degrees. I am not sure if orientation of axis (+/- directions) will be correct. but it will put the z-axis up (or down depending on direction of rotation)
Rotate the space around the X-axis by 90 degrees. I am not sure if orientation of axis (+/- directions) will be correct. but it will put the z-axis up (or down depending on direction of rotation)
I guess I should explain why I need to do this. I wrote a 3DStudioMAX importer over the weekend, but in 3DStudioMAX, Z is the up vector....So, all the vertex positions and face mappings I have are incorrect if used in a system where Y is up.
Would it just be easier if I converted the vertices myself and leave OpenGL as it is?
Thanks for the ideas,
LoCo3D
Would it just be easier if I converted the vertices myself and leave OpenGL as it is?
Thanks for the ideas,
LoCo3D
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement