3D Reading 3d Models

X

Xenon

Guest
Hey guys i've got another quick question how in the world are the normals and faces calculated by 3d modelling programs?

Code:
// I understand this as the 6 points of the mesh
v  7.50000000 -10.00000000  0.00000000
v  7.50000000  10.00000000  0.00000000
v -7.50000000 -10.00000000 -8.66024971
v -7.50000000  10.00000000 -8.66024971
v -7.50000000 -10.00000000  8.66024971
v -7.50000000  10.00000000  8.66024971
//I understand these to be the 11 points in the uv map, what they are assigned to i do not know.
vt  0.54374439  0.98000002
vt  0.98000002  0.98000002
vt  0.54374439  0.47625539
vt  0.52374434  0.98000002
vt  0.02000000  0.98000002
vt  0.02000000  0.47625539
vt  0.52374434  0.47625539
vt  0.98000002  0.47625539
vt  0.98000002  0.23812769
vt  0.54374439  0.45625541
vt  0.54374439  0.02000000
//I understand this to be the normals, the direction a face is compared to with shading and lighting.
vn  0.50000000  0.00000000 -0.86602998
vn -1.00000000  0.00000000  0.00000000
vn  0.50000000  0.00000000  0.86602998
vn  0.00000000  1.00000000  0.00000000
vn  0.00000000 -1.00000000  0.00000000
vn  0.50000000  0.00000000 -0.86602998
vn  0.00000000 -1.00000000  0.00000000
vn  0.50000000  0.00000000  0.86602998
vn  0.50000000  0.00000000 -0.86602998
vn  0.00000000  1.00000000  0.00000000
vn  0.50000000  0.00000000  0.86602998
vn  0.50000000  0.00000000 -0.86602998
vn  0.00000000 -1.00000000  0.00000000
vn -1.00000000  0.00000000  0.00000000
vn  0.50000000  0.00000000 -0.86602998
vn  0.00000000  1.00000000  0.00000000
vn -1.00000000  0.00000000  0.00000000
vn -1.00000000  0.00000000  0.00000000
vn  0.00000000 -1.00000000  0.00000000
vn  0.50000000  0.00000000  0.86602998
vn -1.00000000  0.00000000  0.00000000
vn  0.00000000  1.00000000  0.00000000
vn  0.50000000  0.00000000  0.86602998
//and i understand this to be the faces but what i do not understand is how they are used to create 8 different triangles.
g mesh01
usemtl ___default___
f 4/1/15 2/2/9 1/8/6
f 4/1/15 1/8/6 3/3/12
f 6/4/21 4/5/17 3/6/14
f 6/4/21 3/6/14 5/7/18
f 2/2/11 6/1/23 5/3/20
f 2/2/11 5/3/20 1/8/8
f 2/9/10 4/11/16 6/10/22
f 5/10/19 3/11/13 1/9/7
Can someone explain where i need to plug these numbers into this
Code:
vertex_position_3d(vb_plane, size, -size, 0);
vertex_normal(vb_plane, 0, 0, 1);
vertex_colour(vb_plane, c_white, 1);
vertex_texcoord(vb_plane, 1, 0);
 
Top