Page 1 of 1

S3DVertex

Posted: Fri Mar 12, 2004 9:50 am
by egore911
I got a question i could not find yet an answer. In the tutorial 3 Verticles[0] gets defined as follows:

Vertices[0] = video::S3DVertex(0,0,10, 1,1,0, video::SColor(255,0,255,255), 0, 1);

What does the 1,1,0 stand for???? The API reference that this is nx, ny and nz. But what does this mean???

I have to admint: I have no idea :roll:

Posted: Fri Mar 12, 2004 10:06 am
by Mercior
The normal of the vertex :)

Posted: Fri Mar 12, 2004 10:43 am
by Guest
Don't hit me, but:

What's a normal? :shock:
It's direction?

Posted: Fri Mar 12, 2004 10:54 am
by egore911
Direct3D uses the vertex normals for Gouraud shading, lighting, and texturing effects.
Therefore?

Posted: Fri Mar 12, 2004 10:55 am
by Guest
Ok, if i understand this right, it's the normal vector. But i thought a vertex was a simple point. Why does it have a vector?

Posted: Fri Mar 12, 2004 11:23 am
by Mercior
OpenGl and DirectX both require a normal vector for each vertex in order to light polygons. The normal describes the direction in which the vertex is facing.

Posted: Fri Mar 12, 2004 11:43 am
by egore911
Ok, that explains a lot :)

THX!