コード例 #1
0
ファイル: MvdProjectFrame.cs プロジェクト: mfakane/Keystone
        public static MvdProjectFrame Parse(MvdProjectData pd, BinaryReader br)
        {
            var rt = new MvdProjectFrame
            {
                FrameTime = br.ReadInt64(),
            };

            if (pd.MinorType >= 1)
            {
                rt.Gravity = br.ReadSingle();
                rt.GravityVector = new[] { br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), };
            }

            rt.SelfShadowModel = (MvdSelfShadowModel)br.ReadInt32();
            rt.SelfShadowDistance = br.ReadSingle();

            if (pd.MinorType >= 1 || br.GetRemainingLength() >= 4)
                rt.SelfShadowDeep = br.ReadSingle();

            return rt;
        }
コード例 #2
0
ファイル: MvdProjectFrame.cs プロジェクト: ZeusAFK/Keystone
        public static MvdProjectFrame Parse(MvdProjectData pd, BinaryReader br)
        {
            var rt = new MvdProjectFrame
            {
                FrameTime = br.ReadInt64(),
            };

            if (pd.MinorType >= 1)
            {
                rt.Gravity       = br.ReadSingle();
                rt.GravityVector = new[] { br.ReadSingle(), br.ReadSingle(), br.ReadSingle(), };
            }

            rt.SelfShadowModel    = (MvdSelfShadowModel)br.ReadInt32();
            rt.SelfShadowDistance = br.ReadSingle();

            if (pd.MinorType >= 1 || br.GetRemainingLength() >= 4)
            {
                rt.SelfShadowDeep = br.ReadSingle();
            }

            return(rt);
        }
コード例 #3
0
 protected override void ReadItem(MvdDocument document, BinaryReader br)
 {
     this.Frames.Add(MvdProjectFrame.Parse(this, br));
 }