Untransformed vertices coordinates.,
Members - Reputation: 162
Posted 15 June 2014 - 08:19 PM
Members - Reputation: 2113
Posted 15 June 2014 - 08:50 PM
Defining vertices in that order (counter clockwise) gives you a normal pointing "out" of the XY plane, i.e, a normal on the Z axis with a positive value. Why do you think it's wrong? How do you think it should be and why? Do you know about orthogonal vectors and cross product? http://en.wikipedia.org/wiki/Cross_product
X, Y and Z are real numbers representing a point in space. In theory there's no limit for them, any coordinate of a point in a 3 dimensional space can have any value between minus infinity and infinity. In practice there's a limit when you try to put those numbers inside a computer, since X, Y and Z must be stored in a fixed amount of bits. It depends on the platform you're using, but most of the times you don't worry about it unless you need both really small and really big numbers at the same time. When you work with numbers between a small range you can always think of the values as meters, kilometers, centimeters, miles, or whatever fits better in that case.
What do you mean with "how can I determine a particular shape for my triangle?"?
Members - Reputation: 162
Posted 15 June 2014 - 09:30 PM
GDNet+ - Reputation: 10739
Posted 15 June 2014 - 10:10 PM
I thought that if you present the vertices in a counter-clockwise order the vertices would not be displayed on screen: i probably misunderstood.
Perhaps not. In some APIs (application programming interface), counter-clockwise is the default order. In other APIs, clockwise is the default order. Many APIs support changing the default order during rendering.
Determining whether a particular triangle gets rendered depending on the order of the vertices is called culling. If clockwise order is the default, then, if the vertices of a triangle appear from a particular direction to be in clockwise order, then that is called the "front face" of the triangle. The back face is the same triangle as viewed from the opposite direction, say, from "behind." From the "behind" direction, the vertices appear in counter-clockwise order. As mentioned, many APIs allow the program to set backface culling or frontface culling as an option.
Edited by Buckeye, 15 June 2014 - 10:13 PM.
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.
You don't forget how to play when you grow old; you grow old when you forget how to play.
Crossbones+ - Reputation: 4724
Posted 16 June 2014 - 03:51 AM
In D3D9 you control the culling mode with D3DRS_CULLMODE and set it to CCW, CW or No culling. You sometimes might want to change this value because of how you are rendering things.