private static SubMesh Convert(IExportContainer container, Mesh instanceMesh, ref SubMesh origin) { SubMesh instance = new SubMesh(); instance.FirstByte = origin.FirstByte; instance.IndexCount = origin.IndexCount; instance.Topology = origin.GetTopology(container.Version); if (SubMesh.HasTriangleCount(container.ExportVersion)) { instance.TriangleCount = origin.TriangleCount; } if (SubMesh.HasBaseVertex(container.ExportVersion)) { instance.BaseVertex = GetBaseVertex(container, ref origin); } if (SubMesh.HasVertex(container.ExportVersion)) { SetVertex(container, instanceMesh, ref origin, ref instance); } return(instance); }