• Advertisement

Archived

This topic is now archived and is closed to further replies.

Left handed coords vs right handed

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

is there a way to make opengl use the left handed system of coordinates vs the right handed system?

Share this post


Link to post
Share on other sites
Advertisement
You mean have the x coords all negative ?

well, theres a function called glOrtho(......) that takes 6 arguments;

the first two are the minimum x coords then the maximum x coords, and the same for the next 4, only for y, then z.

so a call like

glOrtho(-100, 0, -100, 0, -100, 0);

is probably what you are looking for.. I cant word it well, just look for that function online or through references.



Share this post


Link to post
Share on other sites
the difference between left handed and right handed is the "view direction".

By default(no rotation), on a right handed coordinated system you are looking in Z+ direction. On a left-handed you are looking at Z-.

So, before doing any modelview transformation, just do the following call

glScalef(1,1,-1);







Share this post


Link to post
Share on other sites
quote:
Original post by Prosper/LOADED
glFrontFace( GL_CCW); // default
glFrontFace( GL_CW); // what you want



Not necessarly.

Share this post


Link to post
Share on other sites
here is what i''m talking about, i just hope this displays in fixed width font

*....z
.....|
.....|
x----y right handed

z....*
|.....
|.....
y----x left handed

open gl is using the right handed system so incressing x values will move a point left when looking along the z axis from the - side. that means a point that is 45 degrees against the x axis is where the * is in the top diagram...now when i learned math i always thought in the left handed system...so when i am working everything i do winds up fliped along the z axis. that make any sence? i want to switch it so that incressing x values will make a point move right instead of left when viewd from the -z axis.

duckbob

Share this post


Link to post
Share on other sites

  • Advertisement