private static void Convert(string fileIn, string fileOut) { MeshGroup p = FromFbx(fileIn); Pmo pmo = MeshGroup2PMO(p); using Stream stream = File.Create(fileOut); Pmo.Write(stream, pmo); stream.Close(); }
public void WritesBackCorrectly() { Stream input = File.OpenRead(FileName); var TestPmo = Pmo.Read(input); Stream output = File.Open("Bbs/res/bbs-dummy_TEST.pmo", FileMode.Create); Pmo.Write(output, TestPmo); input.Position = 0; output.Position = 0; // Check all bytes. for (int i = 0; i < output.Length; i++) { if (input.ReadByte() != output.ReadByte()) { long position = output.Position; Assert.False(true); } } Assert.True(true); }