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)); } }
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)); }
internal static void Load(string filename) { var loadResult = _loader.Load(File.OpenRead(filename)); }