Example #1
0
        internal static CameraFrameList getCrameraFrameList(Stream fs)
        {
            CameraFrameList cfl = new CameraFrameList();

            if (fs == null || fs.Position >= fs.Length)
            {
                cfl.CameraFrameCount = 0;
                return(cfl);
            }
            try
            {
                cfl.CameraFrameCount = ParserHelper.getDWORD(fs);
                for (int i = 0; i < cfl.CameraFrameCount; i++)
                {
                    cfl.CameraFrames.Add(CameraFrameData.getCameraFrame(fs));
                }
            }catch (Exception e)
            {
                cfl.CameraFrameCount = (uint)cfl.CameraFrames.Count;
                System.Diagnostics.Debug.WriteLine(e.StackTrace + e.Message);
                return(cfl);
            }

            return(cfl);
        }
Example #2
0
        public static MotionData getMotion(Stream fs)
        {
            MotionData motion = new MotionData();

            motion.header         = Header.getHeader(fs);
            motion.boneFrameList  = BoneFrameList.getBoneFrameList(fs);
            motion.morphFrameList = MorphFrameList.getFraceFrameList(fs);
            motion.CameraFrames   = CameraFrameList.getCrameraFrameList(fs);
            motion.LightFrames    = LightFrameList.getLightFrameList(fs);
            return(motion);
        }