S3DVertex

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
egore911
Posts: 5
Joined: Fri Mar 12, 2004 9:44 am

S3DVertex

Post 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:
Mercior
Posts: 100
Joined: Tue Feb 24, 2004 1:53 am
Location: UK
Contact:

Post by Mercior »

The normal of the vertex :)
Guest

Post by Guest »

Don't hit me, but:

What's a normal? :shock:
It's direction?
egore911
Posts: 5
Joined: Fri Mar 12, 2004 9:44 am

Post by egore911 »

Direct3D uses the vertex normals for Gouraud shading, lighting, and texturing effects.
Therefore?
Guest

Post 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?
Mercior
Posts: 100
Joined: Tue Feb 24, 2004 1:53 am
Location: UK
Contact:

Post 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.
egore911
Posts: 5
Joined: Fri Mar 12, 2004 9:44 am

Post by egore911 »

Ok, that explains a lot :)

THX!
Post Reply