public MeshSection(StreamReader sr, string name) { this.name = name; vtxList = new VertexList(sr); meshList = new MeshList(sr, vtxList); // 他の何かがある場合 // 閉じるまで繰り返し string read = sr.ReadLine(); while (!Regex.IsMatch(read, "}")) { if (Regex.IsMatch(read, "MeshMaterialList")) { matList = new MeshMaterialList(sr); } else if (Regex.IsMatch(read, "MeshNormals")) { normList = new MeshNormalList(sr); } else if (Regex.IsMatch(read, "MeshTextureCoords")) { uvList = new MeshTextureCoordList(sr); } read = sr.ReadLine(); } }
public MeshSection(StreamReader sr, string name) { this.name = name; vtxList = new VertexList(sr); meshList = new MeshList(sr, vtxList); // 他の何かがある場合 // 閉じるまで繰り返し string read = sr.ReadLine(); while (!Regex.IsMatch(read, "}")) { if (Regex.IsMatch(read, "MeshMaterialList") ){ matList = new MeshMaterialList(sr); } else if (Regex.IsMatch(read, "MeshNormals")) { normList = new MeshNormalList(sr); } else if (Regex.IsMatch(read, "MeshTextureCoords")) { uvList = new MeshTextureCoordList(sr); } read = sr.ReadLine(); } }