Beispiel #1
0
        public void MergeGLBs()
        {
            Assert.IsTrue(File.Exists(TestAssetPaths.GLB_BOX_PATH));
            FileStream glbStream  = File.OpenRead(TestAssetPaths.GLB_BOX_PATH);
            FileStream glbStream1 = File.OpenRead(TestAssetPaths.GLB_BOOMBOX_PATH);
            string     outPath    =
                TestAssetPaths.GetOutPath(TestAssetPaths.GLB_BOX_OUT_PATH_TEMPLATE, 4, TestAssetPaths.GLB_EXTENSION);
            FileStream glbOutStream = new FileStream(outPath, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);

            GLBObject glbObject        = GLBBuilder.ConstructFromStream(glbStream, glbOutStream);
            GLBObject glbObject1       = GLBBuilder.ConstructFromStream(glbStream1);
            uint      initialGLBLength = glbObject.BinaryChunkInfo.Length;

            GLBBuilder.MergeGLBs(glbObject, glbObject1);

            Assert.AreEqual(initialGLBLength + glbObject1.BinaryChunkInfo.Length, glbObject.BinaryChunkInfo.Length);
        }