Exemple #1
0
        void Export_VBUF_Main(StreamWriter w, VBUF vbuf, VRTF vrtf, float[] uvScales, MLOD.Mesh mesh)
        {
            if (vbuf == null) { w.WriteLine("; vbuf is null"); w.WriteLine("vbuf 0"); return; }

            meshExpImp.ModelBlocks.Vertex[] av = vbuf.GetVertices(mesh, vrtf, uvScales);

            w.WriteLine(string.Format("vbuf {0}", av.Length));
            w.Export_VBUF(mpb, av, vrtf);
        }
Exemple #2
0
        void Export_VBUF_Geos(StreamWriter w, VBUF vbuf, VRTF vrtf, float[] uvScales, MLOD.Mesh mesh, int geoStateIndex)
        {
            if (vbuf == null) { w.WriteLine("; vbuf is null for geoState"); w.WriteLine(string.Format("vbuf {0} 0 0", geoStateIndex)); return; }

            MLOD.GeometryState geoState = mesh.GeometryStates[geoStateIndex];

            if (geosVBUFIsContained(geoState, mesh)) w.WriteLine("; vbuf is contained within main mesh");
            w.WriteLine(string.Format("vbuf {0} {1} {2}", geoStateIndex, geoState.MinVertexIndex, geoState.VertexCount));
            if (geosVBUFIsContained(geoState, mesh)) return;

            w.Export_VBUF(mpb, vbuf.GetVertices(mesh, vrtf, geoState, uvScales), vrtf);
        }