Beispiel #1
0
        private void ReadAndLoadObjFileInLoadFactory(string path)
        {
            FileStream fileStream = new FileStream(path, FileMode.OpenOrCreate);

            loadResult = loadFactory.Load(fileStream);
            fileStream.Close();
        }
        private LoadResult GetResult(string file)
        {
            IObjLoaderFactory factory   = new ObjLoaderFactory();
            IObjLoader        objLoader = factory.Create();

            using (var stream = new FileStream(file, FileMode.Open))
            {
                return(objLoader.Load(stream));
            }
        }
Beispiel #3
0
        public static LoadResult LoadOBJ(string filename)
        {
            if (objLoader != null)
            {
                var objloaderFactory = new ObjLoaderFactory();
                objLoader = objloaderFactory.Create();
            }

            FileStream fileStream = new FileStream(filename, FileMode.Open);

            return(objLoader.Load(fileStream));
        }
Beispiel #4
0
 internal static void Load(string filename)
 {
     var loadResult = _loader.Load(File.OpenRead(filename));
 }