internal void Write(BinaryWriter writer) { for (int i = 0; i < DiffuseColor.Length; i++) { writer.Write(DiffuseColor[i]); } writer.Write(Alpha); writer.Write(Specularity); for (int i = 0; i < SpecularColor.Length; i++) { writer.Write(SpecularColor[i]); } for (int i = 0; i < MirrorColor.Length; i++) { writer.Write(MirrorColor[i]); } writer.Write(ToonIndex); writer.Write(EdgeFlag); writer.Write(FaceVertCount); string FileName = TextureFileName; if (string.IsNullOrEmpty(FileName)) { FileName = SphereTextureFileName; } else { if (!string.IsNullOrEmpty(SphereTextureFileName)) { FileName += "*" + SphereTextureFileName; } } writer.Write(MMDModel1.GetBytes(FileName, 20)); }
internal void WriteExpantion(BinaryWriter writer, float CoordZ, float scale) { Position[2] *= CoordZ; Rotation[0] *= CoordZ; Rotation[1] *= CoordZ; writer.Write(MMDModel1.GetBytes(Name, 20)); writer.Write(RelatedBoneIndex); writer.Write(GroupIndex); writer.Write(GroupTarget); writer.Write(ShapeType); writer.Write(ShapeWidth * scale); writer.Write(ShapeHeight * scale); writer.Write(ShapeDepth * scale); for (int i = 0; i < Position.Length; i++) { writer.Write(Position[i] * scale); } for (int i = 0; i < Rotation.Length; i++) { writer.Write(Rotation[i]); } writer.Write(Weight); writer.Write(LinerDamping); writer.Write(AngularDamping); writer.Write(Restitution); writer.Write(Friction); writer.Write(Type); }
internal void Write(BinaryWriter writer, float CoordZ, float scale) { writer.Write(MMDModel1.GetBytes(SkinName, 20)); writer.Write((DWORD)SkinVertDatas.Length); writer.Write(SkinType); for (int i = 0; i < SkinVertDatas.Length; i++) { SkinVertDatas[i].Write(writer, CoordZ, scale); } }
internal void Write(BinaryWriter writer, float CoordZ, float scale) { BoneHeadPos[2] = BoneHeadPos[2] * CoordZ * scale; writer.Write(MMDModel1.GetBytes(BoneName, 20)); writer.Write(ParentBoneIndex); writer.Write(TailPosBoneIndex); writer.Write(BoneType); writer.Write(IKParentBoneIndex); for (int i = 0; i < BoneHeadPos.Length; i++) { writer.Write(BoneHeadPos[i]); } }
internal void WriteExpantion(BinaryWriter writer, float CoordZ, float scale) { Position[2] *= CoordZ; ConstrainRotation1[0] *= CoordZ; ConstrainRotation1[1] *= CoordZ; ConstrainRotation2[0] *= CoordZ; ConstrainRotation2[1] *= CoordZ; ConstrainPosition1[2] *= CoordZ; ConstrainPosition2[2] *= CoordZ; writer.Write(MMDModel1.GetBytes(Name, 20)); writer.Write(RigidBodyA); writer.Write(RigidBodyB); for (int i = 0; i < Position.Length; i++) { writer.Write(Position[i] * scale); } for (int i = 0; i < Rotation.Length; i++) { writer.Write(Rotation[i]); } for (int i = 0; i < ConstrainPosition1.Length; i++) { writer.Write(ConstrainPosition1[i] * scale); } for (int i = 0; i < ConstrainPosition2.Length; i++) { writer.Write(ConstrainPosition2[i] * scale); } for (int i = 0; i < ConstrainRotation1.Length; i++) { writer.Write(ConstrainRotation1[i]); } for (int i = 0; i < ConstrainRotation2.Length; i++) { writer.Write(ConstrainRotation2[i]); } for (int i = 0; i < SpringPosition.Length; i++) { writer.Write(SpringPosition[i] * scale); } for (int i = 0; i < SpringRotation.Length; i++) { writer.Write(SpringRotation[i]); } }
internal void WriteExpantion(BinaryWriter writer) { writer.Write(MMDModel1.GetBytes(SkinNameEnglish, 20)); }
internal void WriteExpantion(BinaryWriter writer) { writer.Write(MMDModel1.GetBytes(BoneDispNameEnglish, 50)); }
internal void Write(BinaryWriter writer) { writer.Write(MMDModel1.GetBytes(BoneDispName, 50)); }
internal void WriteExpantion(BinaryWriter writer) { writer.Write(MMDModel1.GetBytes(ModelNameEnglish, 20)); writer.Write(MMDModel1.GetBytes(CommentEnglish, 256)); }
internal void Write(BinaryWriter writer) { writer.Write(MMDModel1.GetBytes(ModelName, 20)); writer.Write(MMDModel1.GetBytes(Comment, 256)); }