Пример #1
0
 protected override void ReadItem(MvdDocument document, BinaryReader br)
 {
     this.Frames.Add(MvdBoneFrame.Parse(br));
 }
Пример #2
0
        public static MvdBoneFrame Parse(MvdBoneData bd, BinaryReader br)
        {
            var rt = new MvdBoneFrame
            {
                StageId = br.ReadInt32(),
                FrameTime = br.ReadInt64(),
                Position = new[] { br.ReadSingle(), br.ReadSingle(), br.ReadSingle() },
                Quaternion = new[] { br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), br.ReadSingle() },
                XInterpolation = new[] { MvdInterpolationPoint.Parse(br), MvdInterpolationPoint.Parse(br) },
                YInterpolation = new[] { MvdInterpolationPoint.Parse(br), MvdInterpolationPoint.Parse(br) },
                ZInterpolation = new[] { MvdInterpolationPoint.Parse(br), MvdInterpolationPoint.Parse(br) },
                RotationInterpolation = new[] { MvdInterpolationPoint.Parse(br), MvdInterpolationPoint.Parse(br) },
            };

            if (bd.MinorType >= 1)
            {
                rt.Spline = br.ReadBoolean();
                br.ReadBytes(3);
            }

            return rt;
        }