Esempio n. 1
0
        public void SaveToStream(BinaryWriter bw)
        {
            VMDString.WriteString(bw, 15, this.BoneName);
            bw.Write(this.FrameNumber);
            this.Translation.WriteToStream(bw);
            this.Rotation.WriteToStream(bw);

            bw.BaseStream.Write(this.Bezier, 0, 64);
        }
Esempio n. 2
0
        public void SaveToStream(Stream s)
        {
            BinaryWriter bw = new BinaryWriter(s);

            VMDString.WriteString(bw, 30, "Vocaloid Motion Data 0002", Encoding.ASCII);

            VMDString.WriteString(bw, 20, this.ModelName);

            bw.Write((uint)this.Bones.Count);
            foreach (VMDBoneFrame vbf in this.Bones)
            {
                vbf.SaveToStream(bw);
            }

            bw.Write((uint)this.Morphs.Count);
            foreach (VMDMorphFrame vmf in this.Morphs)
            {
                vmf.SaveToStream(bw);
            }

            bw.Write((uint)this.Camera.Count);
            foreach (VMDCameraFrame vcf in this.Camera)
            {
                vcf.SaveToStream(bw);
            }

            bw.Write((uint)this.Light.Count);
            foreach (VMDLightFrame vlf in this.Light)
            {
                vlf.SaveToStream(bw);
            }

            bw.Write((uint)this.Shadow.Count);
            foreach (VMDShadowFrame vsf in this.Shadow)
            {
                vsf.SaveToStream(bw);
            }

            bw.Write((uint)this.IK.Count);
            foreach (VMDIKFrame vif in this.IK)
            {
                vif.SaveToStream(bw);
            }
        }
Esempio n. 3
0
 public void SaveToStream(BinaryWriter bw)
 {
     VMDString.WriteString(bw, 15, this.MorphName);
     bw.Write(this.FrameNumber);
     bw.Write(this.Weight);
 }
Esempio n. 4
0
 public void SaveToStream(BinaryWriter bw)
 {
     VMDString.WriteString(bw, 20, this.IKName);
     bw.Write((byte)(this.Enable ? 1 : 0));
 }