counterclockwise
how can i check if 3 vertex are counterclockwise sorted?
because i''m working with normals and some polygon aren''t visible
Hey,
I haven''t totally read over this or tried it, but this should be exactly what you''re looking for..
http://www.geocities.com/SiliconValley/2151/math2d.html
It''s toward the end of the document, so look there for it.. Let me know if it helps you out..
Optionally for anyone who reads this, a really good place to look for stuff is
http://www.calculus.net
bosco()
--
leader of the free world .. or something ..
I haven''t totally read over this or tried it, but this should be exactly what you''re looking for..
http://www.geocities.com/SiliconValley/2151/math2d.html
It''s toward the end of the document, so look there for it.. Let me know if it helps you out..
Optionally for anyone who reads this, a really good place to look for stuff is
http://www.calculus.net
bosco()
--
leader of the free world .. or something ..
Do you still need this code? If so, I think I have the source in The Black Art of Mac Game Programming (and no, the code is not Mac-specific).
Morgan
Morgan
But if you think about it, any three vertices make a polygon which is a plane and therefore 2d.. Trust me.. It''s what that is describing.. I read it.. You just need to read and understand it.. Do you understand vectors??
bosco()
--
leader of the free world .. or something ..
bosco()
--
leader of the free world .. or something ..
morgan>yes i need it.
bosco>i have understand a thing ,in 2d it''s ok you can find clockwise because the view is always in front of you but in 3d what mean clockwise ?i can watch from the z axis and the result will be one ,i can watch from y axis and the result will be one,ecc.
so the order it''s given by what?
i thought it was given by the front of the polygon but it is determined by normal which is calculated with vertex sorted clockwise,so i''m getting mad
bosco>i have understand a thing ,in 2d it''s ok you can find clockwise because the view is always in front of you but in 3d what mean clockwise ?i can watch from the z axis and the result will be one ,i can watch from y axis and the result will be one,ecc.
so the order it''s given by what?
i thought it was given by the front of the polygon but it is determined by normal which is calculated with vertex sorted clockwise,so i''m getting mad
Paul: Its actually called counter clockwise,
thats why they''re abbreviated CW (clockwise) and CCW (counter clockwise)....
thats why they''re abbreviated CW (clockwise) and CCW (counter clockwise)....
Actually, anti- and counter- depend on where you are in the world (US vs. rest of the world). At any rate, whether a vertex is defined clockwise or counterclockwise is dependant on how it would be viewed. For example, take the following triangle:
1
2
3
If the triangle would be facing you, the order (if going clockwise, i.e., DirectX) would be 1,3,2.
If the triangle were the back side of an object (facing away from you), the order would be 1,2,3.
So it''s all in HOW YOU WOULD VIEW IT.
Vyvyan
1
2
3
If the triangle would be facing you, the order (if going clockwise, i.e., DirectX) would be 1,3,2.
If the triangle were the back side of an object (facing away from you), the order would be 1,2,3.
So it''s all in HOW YOU WOULD VIEW IT.
Vyvyan
Ok, sorry, I didn''t know that...
I''m from Sweden and have always only heard ''counterclockwise''...
I''m from Sweden and have always only heard ''counterclockwise''...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement