public void Write(BinaryWriter bw, PmxDocument doc) { bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.Name)); bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.EnglishName)); this.Diffuse.ForEach(bw.Write); this.Specular.ForEach(bw.Write); bw.Write(this.Power); this.Ambient.ForEach(bw.Write); bw.Write((byte)this.Options); this.EdgeColor.ForEach(bw.Write); bw.Write(this.EdgeSize); doc.WriteIndex(bw, PmxIndexKind.Texture, this.MainTexture); doc.WriteIndex(bw, PmxIndexKind.Texture, this.SubTexture); bw.Write((byte)this.SubTextureMode); bw.Write(this.UseSharedToonTexture); if (this.UseSharedToonTexture) { bw.Write((byte)this.ToonTexture); } else { doc.WriteIndex(bw, PmxIndexKind.Texture, this.ToonTexture); } bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.Comment)); bw.Write(this.IndexCount); }
public override void Write(BinaryWriter bw, PmxDocument doc) { base.Write(bw, doc); doc.WriteIndex(bw, PmxIndexKind.Rigid, this.RigidA); doc.WriteIndex(bw, PmxIndexKind.Rigid, this.RigidB); this.Position.ForEach(bw.Write); this.Rotation.ForEach(bw.Write); this.LinearLowerLimit.ForEach(bw.Write); this.LinearUpperLimit.ForEach(bw.Write); this.AngularLowerLimit.ForEach(bw.Write); this.AngularUpperLimit.ForEach(bw.Write); this.LinearSpringStiffness.ForEach(bw.Write); this.AngularSpringStiffness.ForEach(bw.Write); }
public override void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Rigid, this.Rigid); bw.Write(this.IsLocal); this.CentralImpulse.ForEach(bw.Write); this.TorqueImpulse.ForEach(bw.Write); }
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); } }
public void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Bone, this.TargetBone); bw.Write(this.LoopCount); bw.Write(this.AngleLimitUnit); bw.Write(this.BindedBones.Count); this.BindedBones.ForEach(_ => _.Write(bw, doc)); }
public override void Write(BinaryWriter bw, PmxDocument doc) { this.Bones.ForEach(_ => doc.WriteIndex(bw, PmxIndexKind.Bone, _)); bw.Write(this.Weight); this.Center.ForEach(bw.Write); this.RangeZero.ForEach(bw.Write); this.RangeOne.ForEach(bw.Write); }
public void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Bone, this.Bone); bw.Write(this.IsAngleLimitEnabled); if (this.IsAngleLimitEnabled) { this.LowerAngleLimit.ForEach(bw.Write); this.HigherAngleLimit.ForEach(bw.Write); } }
public override void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Material, this.Material); bw.Write((byte)this.Kind); this.Diffuse.ForEach(bw.Write); this.Specular.ForEach(bw.Write); bw.Write(this.Power); this.Ambient.ForEach(bw.Write); this.EdgeColor.ForEach(bw.Write); bw.Write(this.EdgeSize); this.Texture.ForEach(bw.Write); this.SubTexture.ForEach(bw.Write); this.ToonTexture.ForEach(bw.Write); }
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); }
public void Write(BinaryWriter bw, PmxDocument doc) { bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.Name)); bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.EnglishName)); this.Diffuse.ForEach(bw.Write); this.Specular.ForEach(bw.Write); bw.Write(this.Power); this.Ambient.ForEach(bw.Write); bw.Write((byte)this.Options); this.EdgeColor.ForEach(bw.Write); bw.Write(this.EdgeSize); doc.WriteIndex(bw, PmxIndexKind.Texture, this.MainTexture); doc.WriteIndex(bw, PmxIndexKind.Texture, this.SubTexture); bw.Write((byte)this.SubTextureMode); bw.Write(this.UseSharedToonTexture); if (this.UseSharedToonTexture) bw.Write((byte)this.ToonTexture); else doc.WriteIndex(bw, PmxIndexKind.Texture, this.ToonTexture); bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.Comment)); bw.Write(this.IndexCount); }
public override void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Morph, this.Morph); bw.Write(this.Weight); }
public override void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Bone, this.Bone); }
public override void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Bone, this.Bone); this.MovementOffset.ForEach(bw.Write); this.RotationOffset.ForEach(bw.Write); }
public void Write(BinaryWriter bw, PmxDocument doc) { bw.Write((byte)this.Kind); doc.WriteIndex(bw, this.Kind == PmxDisplayItemKind.Bone ? PmxIndexKind.Bone : PmxIndexKind.Morph, this.Index); }
public override void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Vertex, this.Vertex); this.Offset.ForEach(bw.Write); }
public override void Write(BinaryWriter bw, PmxDocument doc) { this.Bones.ForEach(_ => doc.WriteIndex(bw, PmxIndexKind.Bone, _)); bw.Write(this.Weight); }
public override void Write(BinaryWriter bw, PmxDocument doc) { this.Bones.ForEach(_ => doc.WriteIndex(bw, PmxIndexKind.Bone, _)); this.Weights.ForEach(bw.Write); }
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); }