public void MergeMeshes() { var submesh = new ObjMesh(this); submesh.PositionFaces = Meshes.SelectMany(i => i.PositionFaces).ToList(); submesh.NormalFaces = Meshes.SelectMany(i => i.NormalFaces) .ToList(); submesh.TexCoordFaces = Meshes.SelectMany(i => i.TexCoordFaces).ToList(); Meshes.Clear(); Meshes.Add(submesh); }
private ObjMesh NewMesh() { if(CurrentMesh != null && CurrentMesh.IsEmpty) return CurrentMesh; CurrentMesh = new ObjMesh(CurrentGroup); CurrentGroup.Meshes.Add(CurrentMesh); return CurrentMesh; }