static void BladebinToPlys(string bladebin, string outflatfile, string outsharpfile) { Console.Out.WriteLine("inputfile (bladebi): {0}, outflatfile (ply): {1}, outsharpfile (ply): {2}", bladebin, outflatfile, outsharpfile); using (Stream stream = new FileStream(bladebin, FileMode.Open)) { var loader = new BladeMeshLoader(stream); loader.WriteTo(outflatfile, outsharpfile); } }
static void PlysToBladebin(string flatfile, string sharpfile, string outfile) { Console.Out.WriteLine("flatfile (ply): {0}, sharpfile (ply): {1}, outfile (bladebin): {2}", flatfile, sharpfile, outfile); using (Stream stream = new FileStream(outfile, FileMode.Create)) { var loader = new BladeMeshLoader(flatfile, sharpfile); loader.WriteTo(stream); } }
public BladeMesh(string flatSword, string sharpSword) { try { var loader = new BladeMeshLoader(flatSword, sharpSword); LoadMeshData(loader.Vertices, loader.Indices); } catch { Console.Error.WriteLine("The blade mesh will not contain any data"); } }
public BladeMesh(string filename) { try { using (Stream stream = new FileStream(filename, FileMode.Open)){ var loader = new BladeMeshLoader(stream); LoadMeshData(loader.Vertices, loader.Indices); } } catch { Console.Error.WriteLine("The blade mesh will not contain any data"); } }