P3D Lod Faces
Jump to navigation
Jump to search
Alias 'Polygons'
LodFace
LodFace { //////////// MLOD //////////////////////// char TextureName[32] // SP3X ONLY (ofp) ulong type; // 3==Triangle or 4==Box PsuedoVertexTable PsuedoVertexTables[4];// ulong FaceFlags; // P3D Point and Face Flags Asciiz TextureName; // P3DM ONLY (arma) Asciiz MaterialName; // P3DM ONLY (arma) ////////// ODOL //////////////////////// ulong FaceFlags; //ODOL7 ONLY see P3D Point and Face Flags short TextureIndex; //ODOL7 ONLY byte type; // 3==Triangle or 4==Box ushort VertexTableIndex[type]// ////////////////////////////////////////// }
There are always 3, or 4, vertices.
- 3 point vertices describe a triangle.
- 4 point vertices describe a rectangle.
The indices must be transformed as follows
- triangles : 1st posn, 2nd posn, 0th posn.
- quadrangles : 1st, 2nd, 3rd, 0th
The each of 3 (or 4) indexes look up their respective vertextable, which contains, points, normals, uvsets etc.
The TextureIndex is a zero based array. If set to -1, there are no textures for this face or section
PsuedoVertexTable
PsuedoVertexTable { ulong PointsIndex; ulong NormalsIndex; float U,V; }