public PMDData() { Header = new PMDHeader (); Vertices = new PMDVertexCollection (); Indices = new PMDIndexCollection (); Materials = new PMDMaterialCollection (); Bones = new PMDBoneCollection (); Iks = new PMDIkCollection (); Faces = new PMDFaceCollection (); FaceFrames = new PMDFaceFrameCollection (); BoneFrames = new PMDBoneFrameCollection (); English = new PMDEnglish (); Toons = new PMDToonCollection (); Physicses = new PMDPhysicsCollection (); Joints = new PMDJointCollection (); }
private IPMDEnglish ReadEnglish() { //DebugPrintOffset("ReadEnglish"); var value = new PMDEnglish(); var eng = Reader.ReadByte(); if(eng == 0) return value; int bonecount = Current.Bones.Count; int facecount = Current.Faces.Count; int boneframecount = Current.BoneFrames.Count; value.Enable = true; value.Name = ReadString(20); value.Comment = ReadString(256); value.BoneNames = ReadCollection<List<string>, string> (bonecount-1, () => { return ReadString(20); }); value.FaceNames = ReadCollection<List<string>, string> (facecount, () => { return ReadString(20); }); value.BoneFrameNames = ReadCollection<List<string>, string> (boneframecount, () => { return ReadString(50); }); return value; }