public void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteString(bw, this.Name); doc.WriteString(bw, this.EnglishName); bw.Write((byte)this.Kind); doc.WriteIndex(bw, PmxIndexKind.Material, this.RelatedMaterial); bw.Write(this.Group); bw.Write((ushort)this.CollidableGroups); bw.Write((byte)this.Options); bw.Write(this.BendingLinkDistance); bw.Write(this.ClusterCount); bw.Write(this.TotalMass); bw.Write(this.Margin); bw.Write((int)this.AeroModel); this.Configuration.OrderBy(_ => _.Key).Select(_ => _.Value).ForEach(bw.Write); bw.Write(this.VelocitySolverIteration); bw.Write(this.PositonSolverIteration); bw.Write(this.DriftSolverIteration); bw.Write(this.ClusterSolverIteration); bw.Write(this.LinearStiffnessCoefficient); bw.Write(this.AreaAngularStiffnessCoefficient); bw.Write(this.VolumeStiffnessCoefficient); bw.Write(this.Anchors.Count); this.Anchors.ForEach(_ => _.Write(bw, doc)); bw.Write(this.PinnedVertices.Count); this.PinnedVertices.ForEach(_ => doc.WriteIndex(bw, PmxIndexKind.Vertex, _)); }
public void Write(BinaryWriter bw, PmxDocument doc) { doc.WriteIndex(bw, PmxIndexKind.Rigid, this.Rigid); doc.WriteIndex(bw, PmxIndexKind.Vertex, this.Vertex); bw.Write(this.IsNearMode); }