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; }
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); }
protected override void ReadItem(MvdDocument document, BinaryReader br) { this.Frames.Add(MvdProjectFrame.Parse(this, br)); }