Esempio n. 1
0
        public IAnimMatricesProvider GetAnimProvider(Stream mdlxStream)
        {
            var animEntry = entries
                            .First(it => it.Type == Bar.EntryType.Motion); // anb bar should have single 0x09 (AnimationData)
            var animStream = animEntry.Stream;

            var animReader = new AnimReader(animStream);

            return(new EmuBasedAnimMatricesProvider(animReader, mdlxStream, animStream));
        }
        public EmuBasedAnimMatricesProvider(
            AnimReader animReader,
            Stream mdlxStream,
            Stream animStream
            )
        {
            emuRunner       = new Mlink();
            this.animReader = animReader;

            var matrixOutStream = new MemoryStream();

            mdlxStream.Position = 0;
            animStream.Position = 0;

            // initialize emulator memory space
            emuRunner.Permit(
                mdlxStream, animReader.cntb1,
                animStream, animReader.cntb2,
                0, (float)absTime, matrixOutStream
                );
        }