Exemple #1
0
        private static MaterialLibrary MatlToLibrary(Matl matlFile)
        {
            var library = new MaterialLibrary
            {
                materials = matlFile.Entries.Select(e => CreateMaterial(e)).ToArray()
            };

            return(library);
        }
Exemple #2
0
        private static Matl LibraryToMATL(MaterialLibrary library)
        {
            var matl = new Matl();

            if (library.materials != null)
            {
                matl.Entries = library.materials.Select(m => CreateEntry(m)).ToArray();
            }

            return(matl);
        }