Пример #1
0
 public void readMD3FrameVerts(ByteFileReader r, int vertexCount)
 {
     for (int i = 0; i < vertexCount; i++)
     {
         MD3Vertex v = new MD3Vertex();
         v.readMD3Vertex(r);
         verts.Add(v);
     }
 }
Пример #2
0
 public void addToSimpleStaticMeshBuilder(int frameIndex, ISimpleStaticMeshBuilder o)
 {
     o.beginSurface(materials[0]);
     for (int i = 0; i < indices.Count; i += 3)
     {
         int       i0  = indices[i + 0];
         int       i1  = indices[i + 1];
         int       i2  = indices[i + 2];
         MD3Vertex v0  = frameVerts[frameIndex].getVertex(i0);
         MD3Vertex v1  = frameVerts[frameIndex].getVertex(i1);
         MD3Vertex v2  = frameVerts[frameIndex].getVertex(i2);
         Vec2      tc0 = texCoords[i0];
         Vec2      tc1 = texCoords[i1];
         Vec2      tc2 = texCoords[i2];
         o.addTriangle(v0.getPos(), v1.getPos(), v2.getPos(), tc0, tc1, tc2);
     }
     o.endSurface();
 }