Exemplo n.º 1
0
 public void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.ModelName);
     doc.WriteString(bw, this.EnglishModelName);
     doc.WriteString(bw, this.Description);
     doc.WriteString(bw, this.EnglishDescription);
 }
Exemplo n.º 2
0
 public void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.ModelName);
     doc.WriteString(bw, this.EnglishModelName);
     doc.WriteString(bw, this.Description);
     doc.WriteString(bw, this.EnglishDescription);
 }
Exemplo n.º 3
0
 public void Write(BinaryWriter bw, PmxDocument doc, PmxIndexCache cache)
 {
     doc.WriteString(bw, this.Name);
     doc.WriteString(bw, this.EnglishName);
     bw.Write(this.IsSpecial);
     bw.Write(this.Items.Count);
     this.Items.ForEach(_ => _.Write(bw, doc, cache));
 }
Exemplo n.º 4
0
 public void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.Name);
     doc.WriteString(bw, this.EnglishName);
     bw.Write(this.IsSpecial);
     bw.Write(this.Items.Count);
     this.Items.ForEach(_ => _.Write(bw, doc));
 }
Exemplo n.º 5
0
        public void Write(BinaryWriter bw, PmxDocument doc)
        {
            if (doc.Version < 2.1f)
                if (this.Kind == PmxMorphKind.Flip)
                    this.Kind = PmxMorphKind.Group;
                else if (this.Kind == PmxMorphKind.Impulse)
                    return;

            doc.WriteString(bw, this.Name);
            doc.WriteString(bw, this.EnglishName);
            bw.Write((byte)this.Category);
            bw.Write((byte)this.Kind);
            bw.Write(this.Offsets.Count);
            this.Offsets.ForEach(_ => _.Write(bw, doc));
        }
Exemplo n.º 6
0
        public void Write(BinaryWriter bw, PmxDocument doc)
        {
            doc.WriteString(bw, this.Name);
            doc.WriteString(bw, this.EnglishName);
            this.Position.ForEach(bw.Write);
            doc.WriteIndex(bw, PmxIndexKind.Bone, this.ParentBone);
            bw.Write(this.Priority);
            bw.Write((ushort)this.Capabilities);

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.ConnectToBone))
            {
                doc.WriteIndex(bw, PmxIndexKind.Bone, this.ConnectToBone);
            }
            else
            {
                this.ConnectToOffset.ForEach(bw.Write);
            }

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.RotationAffected) ||
                this.Capabilities.HasFlag(PmxBoneCapabilities.MovementAffected))
            {
                doc.WriteIndex(bw, PmxIndexKind.Bone, this.AffectedBone);
                bw.Write(this.AffectionRate);
            }

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.FixedAxis))
            {
                this.FixedAxis.ForEach(bw.Write);
            }

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.LocalAxis))
            {
                this.LocalVectorX.ForEach(bw.Write);
                this.LocalVectorZ.ForEach(bw.Write);
            }

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.TransformByExternalParent))
            {
                bw.Write(this.ExternalParentKey);
            }

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.IK))
            {
                this.IK.Write(bw, doc);
            }
        }
Exemplo n.º 7
0
 public void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.Name);
     doc.WriteString(bw, this.EnglishName);
     doc.WriteIndex(bw, PmxIndexKind.Bone, this.RelatedBone);
     bw.Write(this.Group);
     bw.Write((ushort)this.CollidableGroups);
     bw.Write((byte)this.Shape);
     this.Size.ForEach(bw.Write);
     this.Position.ForEach(bw.Write);
     this.Rotation.ForEach(bw.Write);
     bw.Write(this.Mass);
     bw.Write(this.LinearDamping);
     bw.Write(this.AngularDamping);
     bw.Write(this.Restitution);
     bw.Write(this.Friction);
     bw.Write((byte)this.Kind);
 }
Exemplo n.º 8
0
        public void Write(BinaryWriter bw, PmxDocument doc)
        {
            if (doc.Version < 2.1f)
            {
                if (this.Kind == PmxMorphKind.Flip)
                {
                    this.Kind = PmxMorphKind.Group;
                }
                else if (this.Kind == PmxMorphKind.Impulse)
                {
                    return;
                }
            }

            doc.WriteString(bw, this.Name);
            doc.WriteString(bw, this.EnglishName);
            bw.Write((byte)this.Category);
            bw.Write((byte)this.Kind);
            bw.Write(this.Offsets.Count);
            this.Offsets.ForEach(_ => _.Write(bw, doc));
        }
Exemplo n.º 9
0
 public void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.FileName);
 }
Exemplo n.º 10
0
 public virtual void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.Name);
     doc.WriteString(bw, this.EnglishName);
     bw.Write((byte)(doc.Version < 2.1f ? PmxConstraintKind.SpringSixDegreesOfFreedom : this.Kind));
 }
Exemplo n.º 11
0
 public void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.Name);
     doc.WriteString(bw, this.EnglishName);
     doc.WriteIndex(bw, PmxIndexKind.Bone, this.RelatedBone);
     bw.Write(this.Group);
     bw.Write((ushort)this.CollidableGroups);
     bw.Write((byte)this.Shape);
     this.Size.ForEach(bw.Write);
     this.Position.ForEach(bw.Write);
     this.Rotation.ForEach(bw.Write);
     bw.Write(this.Mass);
     bw.Write(this.LinearDamping);
     bw.Write(this.AngularDamping);
     bw.Write(this.Restitution);
     bw.Write(this.Friction);
     bw.Write((byte)this.Kind);
 }
Exemplo n.º 12
0
 public virtual void Write(BinaryWriter bw, PmxDocument doc)
 {
     doc.WriteString(bw, this.Name);
     doc.WriteString(bw, this.EnglishName);
     bw.Write((byte)(doc.Version < 2.1f ? PmxConstraintKind.SpringSixDegreesOfFreedom : this.Kind));
 }
Exemplo n.º 13
0
        public void Write(BinaryWriter bw, PmxDocument doc, PmxIndexCache cache)
        {
            doc.WriteString(bw, this.Name);
            doc.WriteString(bw, this.EnglishName);
            this.Position.ForEach(bw.Write);
            cache.Write(this.ParentBone);
            bw.Write(this.Priority);
            bw.Write((ushort)this.Capabilities);

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.ConnectToBone))
                cache.Write(this.ConnectToBone);
            else
                this.ConnectToOffset.ForEach(bw.Write);

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.RotationAffected) ||
                this.Capabilities.HasFlag(PmxBoneCapabilities.MovementAffected))
            {
                cache.Write(this.AffectedBone);
                bw.Write(this.AffectionRate);
            }

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.FixedAxis))
                this.FixedAxis.ForEach(bw.Write);

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.LocalAxis))
            {
                this.LocalVectorX.ForEach(bw.Write);
                this.LocalVectorZ.ForEach(bw.Write);
            }

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.TransformByExternalParent))
                bw.Write(this.ExternalParentKey);

            if (this.Capabilities.HasFlag(PmxBoneCapabilities.IK))
                this.IK.Write(bw, doc, cache);
        }