Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Left handed coords vs right handed


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 duckbob   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 November 2001 - 12:29 PM

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

Sponsor:

#2 Zeus_   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 November 2001 - 01:56 PM

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.





#3 Gorg   Members   -  Reputation: 248

Like
Likes
Like

Posted 26 November 2001 - 03:55 AM

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);









#4 Prosper/LOADED   Members   -  Reputation: 100

Like
Likes
Like

Posted 26 November 2001 - 08:10 AM

glFrontFace( GL_CCW); // default
glFrontFace( GL_CW); // what you want


#5 Gorg   Members   -  Reputation: 248

Like
Likes
Like

Posted 26 November 2001 - 09:10 AM

quote:
Original post by Prosper/LOADED
glFrontFace( GL_CCW); // default
glFrontFace( GL_CW); // what you want



Not necessarly.



#6 duckbob   Members   -  Reputation: 122

Like
Likes
Like

Posted 06 January 2002 - 02:33 PM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS