FromFile_SkipTextures() 개인적인 메소드

private FromFile_SkipTextures ( Kn5Reader reader ) : void
reader Kn5Reader
리턴 void
예제 #1
0
        public static Kn5 FromStream(Stream entry, bool skipTextures = false) {
            var kn5 = new Kn5(string.Empty);

            using (var reader = new Kn5Reader(entry)) {
                kn5.FromFile_Header(reader);

                if (skipTextures) {
                    kn5.FromFile_SkipTextures(reader);
                } else {
                    kn5.FromFile_Textures(reader);
                }

                kn5.FromFile_Materials(reader);
                kn5.FromFile_Nodes(reader);
            }

            return kn5;
        }
예제 #2
0
        public static Kn5 FromFile(string filename, bool skipTextures = false) {
            if (!File.Exists(filename)) {
                throw new FileNotFoundException(filename);
            }

            var kn5 = new Kn5(filename);

            using (var reader = new Kn5Reader(filename)) {
                kn5.FromFile_Header(reader);

                if (skipTextures) {
                    kn5.FromFile_SkipTextures(reader);
                } else {
                    kn5.FromFile_Textures(reader);
                }

                kn5.FromFile_Materials(reader);
                kn5.FromFile_Nodes(reader);
            }

            return kn5;
        }