Exemplo n.º 1
0
        internal static LightFrameList getLightFrameList(Stream fs)
        {
            LightFrameList lfl = new LightFrameList();

            if (fs == null || fs.Position >= fs.Length)
            {
                lfl.LightCount = 0;
                return(lfl);
            }
            try
            {
                lfl.LightCount = ParserHelper.getDWORD(fs);
                for (int i = 0; i < lfl.LightCount; i++)
                {
                    lfl.LightFrames.Add(LightFrameData.getLightFrame(fs));
                }
            }
            catch (Exception e)
            {
                lfl.LightCount = (uint)lfl.LightFrames.Count;
                System.Diagnostics.Debug.WriteLine(e.StackTrace + e.Message);
                return(lfl);
            }
            return(lfl);
        }
Exemplo n.º 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);
        }