Tri_TexCoords() are the texture coords of the three vertices of that triangle. The declaration is this:
Tri_TexCoords(1 To 3, 1 To 2) As GLfloat
Basically, there are three (the "1 To 3" bit) pairs (the "1 To 2" bit) of texture coords, one for each vertex in the triangle. It''s a two-dimensional array. In C it would be:
GLfloat Tri_TexCoords[3][2];
The for loop runs through the three vertices of the triangle, multiplies every x, y, z element of the vertex by the x, y, z elements of sCoord and tCoord and then adds together the products of those multiplications to get the s texture coord and t texture coord respectively.
I hope this is explained well enough here for you to understand it, like I said before, it''s kinda difficult without pictures. I''ll try to do it in C:
for(int y=0;y<3;y++){ // Get the s texture coord... TextureCoord[y][0] = (sCoord[0] * Vertex[y][0]) + (sCoord[1] * Vertex[y][1]) + (sCoord[2] * Vertex[y][2]); // Get the t texture coord... TextureCoord[y][1] = (tCoord[0] * Vertex[y][0]) + (tCoord[1] * Vertex[y][1]) + (tCoord[2] * Vertex[y][2]); }
I had to think about that! I''ve been using VB to develop my map editor for some time now, and VB''s syntax is nothing compared to C. Anyway, that''s it. Do you have a website with some pictures of your map editor on it? I''d be interested to see how you''re doing it...
Movie Quote of the Week:
"Mr. Madison, what you have just said is one of the most insanely
idiotic things I have ever heard. At no point in your rambling,
incoherent response were you even close to anything that could
be considered a rational thought. Everyone in this room is now
dumber for having listened to it. I award you no points, and may
God have mercy on your soul."
- The Principal, Billy Madison.Try http://uk.geocities.com/mentalmantle. Seriously. It''s brilliant.
And I just completely redesigned it so it looks even better.
DarkVertex Beta 0.8 available soon!