private void ReconstructGeometry(GMA gma) { if (gma == null) { return; } if (gma.Models == null) { return; } int index = 0; foreach (GMA.Model model in gma.Models) { index++; if (model == null) { goto LOOP_END; } if (model.VertexStrips == null) { goto LOOP_END; } // Display if chosen to in inspector if (index == modelSelect | showAllModels) { continue; } else { goto LOOP_END; } DebugDisplayMesh(model); foreach (GMA.GC_VertexStripCollection vertCollection in model.VertexStrips) { // OPAQUE STRIPS for (int i = 0; i < vertCollection.MT_Strips.Length; i++) { for (int j = 0; j < vertCollection.MT_Strips[i].Verts.Length - 2; j++) { Debug.DrawLine( vertCollection.MT_Strips[i].Verts[j + 0].Position, vertCollection.MT_Strips[i].Verts[j + 1].Position, Color.white //Palette.ColorWheel(i, depth) ); Debug.DrawLine( vertCollection.MT_Strips[i].Verts[j + 1].Position, vertCollection.MT_Strips[i].Verts[j + 2].Position, Color.white //Palette.ColorWheel(i, depth) ); Debug.DrawLine( vertCollection.MT_Strips[i].Verts[j + 2].Position, vertCollection.MT_Strips[i].Verts[j + 0].Position, Color.white //Palette.ColorWheel(i, depth) ); } } // TRANSLUCID STRIPS //for (int i = 0; i < vertCollection.MT_TL_Strips.Length; i++) // for (int j = 0; j < vertCollection.MT_TL_Strips[i].Verts.Length - 2; j++) // { // Debug.DrawLine( // vertCollection.MT_TL_Strips[i].Verts[j + 0].Position, // vertCollection.MT_TL_Strips[i].Verts[j + 1].Position, // Color.white // ); // Debug.DrawLine( // vertCollection.MT_TL_Strips[i].Verts[j + 1].Position, // vertCollection.MT_TL_Strips[i].Verts[j + 2].Position, // Color.white // ); // Debug.DrawLine( // vertCollection.MT_TL_Strips[i].Verts[j + 2].Position, // vertCollection.MT_TL_Strips[i].Verts[j + 0].Position, // Color.white // ); // } } LOOP_END :; } }
public override void Import() { GMA = new GMA(GetStreamFromFile(filename)); }