Hello iedereen,
Ik weet niet echt waar ik dit neer kan zetten, dit leek me de beste plaats.
Ik ben begonnen aan een D3D9 boek. Ik ben er net aan begonnen en ik heb al een vraag over iets dat onduidelijk is. Ze hebben het over het detecteren als een object van voren bekeken word. Alleen ik snap hun beredenatie niet. Ze zeggen:
"Als je het object met de klok mee nummers geeft aan elk punt, dan kan je daar aan zien als iets van de voor af achterkant bekeken word."

Als je dat dus doet krijg je dit:

Hun stelling als als volgt:
En als je dan naar de achter kant kijkt, 6 - 7 - 3 - 2. Dit vind ik ook niet echt aflopen. Hoe je het ook neer zet. Het enigste dat ik er uit kan opmaken wat ze misschien bedoelen is dat er 3 getallen zijn die aflopen of oplopen. Maar meer ook echt niet.
Ik heb ook al op Google gezocht. Het enige nuttige dat ik kan vinden is:
In mijn boek staat het op de volgende manier:

Zou iemand me kunnen uitleggen hoe dit nu zit?
Alvast bedankt!
Ik weet niet echt waar ik dit neer kan zetten, dit leek me de beste plaats.
Ik ben begonnen aan een D3D9 boek. Ik ben er net aan begonnen en ik heb al een vraag over iets dat onduidelijk is. Ze hebben het over het detecteren als een object van voren bekeken word. Alleen ik snap hun beredenatie niet. Ze zeggen:
"Als je het object met de klok mee nummers geeft aan elk punt, dan kan je daar aan zien als iets van de voor af achterkant bekeken word."

Als je dat dus doet krijg je dit:

Hun stelling als als volgt:
Ik vind alleen 1 - 4 - 8 - 5 niet met de klok mee. Ik kan ook geen enkelen combinatie vinden hoe je deze kan zetten dat het met de klok mee gaat.For example, the front face is made up of points P1, P4, P8 and P5. When viewed from in front of that
face this is a clockwise specification. It does not matter which vertex in the face begins the run. We
could have created the front face in this order: P8, P5, P1 and P4 and it would still work perfectly
because the order remains clockwise. This order is referred to as the polygon winding order. In
DirectX Graphics, polygons are assumed to have a clockwise winding by default (Fig 1.14) -- although
you can change this if desired.
Now look at the back face. It uses the vertex order P6, P7, P3 and P2. This is clearly counter-clockwise
so we will not draw it. Of course if we were to rotate the cube so that the back face was now facing us,
you would notice that the vertex order would then be clockwise.
En als je dan naar de achter kant kijkt, 6 - 7 - 3 - 2. Dit vind ik ook niet echt aflopen. Hoe je het ook neer zet. Het enigste dat ik er uit kan opmaken wat ze misschien bedoelen is dat er 3 getallen zijn die aflopen of oplopen. Maar meer ook echt niet.
Ik heb ook al op Google gezocht. Het enige nuttige dat ik kan vinden is:
ofAs you see, for every vertex we first define its position. Notice again that we have defined our vertices in a clockwise way, so DirectX will not cull them.
Maar nergens staat goed uitgelegd hoe het werkt.OpenGL face culling calculates the signed area of the filled primitive in window coordinate space. The signed area is positive when the window coordinates are in a counter-clockwise order and negative when clockwise. An app can use glFrontFace() to specify the ordering, counter-clockwise or clockwise, to be interpreted as a front-facing or back-facing primitive. An application can specify culling either front or back faces by calling glCullFace(). Finally, face culling must be enabled with a call to glEnable(GL_CULL_FACE); .
In mijn boek staat het op de volgende manier:
BIj een driehoek zie ik het wel:So how does one determine which way a polygon is facing? After all, in our cube example, a face is
simply four points; we do not provide any directional information.
The answer lies in the order in which we store the vertices within our polygons. If you look at Fig 1.13
and then reference it against the code in LP 1.1, you will notice that the polygon vertices are passed in
using a clockwise order.
For example, the front face is made up of points P1, P4, P8 and P5. When viewed from in front of that
face this is a clockwise specification. It does not matter which vertex in the face begins the run. We
could have created the front face in this order: P8, P5, P1 and P4 and it would still work perfectly
because the order remains clockwise. This order is referred to as the polygon winding order. In
DirectX Graphics, polygons are assumed to have a clockwise winding by default (Fig 1.14) -- although
you can change this if desired.
Now look at the back face. It uses the vertex order P6, P7, P3 and P2. This is clearly counter-clockwise
so we will not draw it. Of course if we were to rotate the cube so that the back face was now facing us,
you would notice that the vertex order would then be clockwise.
Zou iemand me kunnen uitleggen hoe dit nu zit?
Alvast bedankt!