Example #1
0
        public void addToSimpleStaticMeshBuilder(ISimpleStaticMeshBuilder o)
        {
            o.beginSurface(this.materialName);
            for (int i = 0; i < indices.Count; i += 3)
            {
                int       i0  = indices[i + 0];
                int       i1  = indices[i + 1];
                int       i2  = indices[i + 2];
                MD5Vertex v0  = vertices[i0];
                MD5Vertex v1  = vertices[i1];
                MD5Vertex v2  = vertices[i2];
                Vec2      st0 = v0.getTexCoords();
                Vec2      st1 = v1.getTexCoords();
                Vec2      st2 = v2.getTexCoords();
#if false
                Vec3 xyz0 = weights[v0.getFirstWeightIndex()].getOfs();
                Vec3 xyz1 = weights[v1.getFirstWeightIndex()].getOfs();
                Vec3 xyz2 = weights[v2.getFirstWeightIndex()].getOfs();
#else
                Vec3 xyz0 = v0.getCurrentPos();
                Vec3 xyz1 = v1.getCurrentPos();
                Vec3 xyz2 = v2.getCurrentPos();
#endif
                o.addTriangle(xyz0, xyz1, xyz2, st0, st1, st2);
            }
            o.endSurface();
        }
Example #2
0
 public void addVertex(MD5Vertex v)
 {
     vertices.Add(v);
 }