public void GetData(PmxModelData data) { var header = new PmxHeaderData() { Version = 2.0F }; var boneSlot = new PmxSlotData() { SlotName = "弾ボーン", Type = PmxSlotData.SLOT_TYPE_BONE, Indices = Enumerable.Range(0, BoneList.Count).ToArray() }; var morphSlot = new PmxSlotData() { SlotName = "弾モーフ", Type = PmxSlotData.SLOT_TYPE_MORPH, Indices = Enumerable.Range(0, MorphList.Count).ToArray() }; data.Header = header; data.VertexIndices = IndexList.ToArray(); data.TextureFiles = TextureList.ToArray(); data.VertexArray = VertexList.ToArray(); data.MaterialArray = MaterialList.ToArray(); data.BoneArray = BoneList.ToArray(); data.MorphArray = MorphList.ToArray(); data.SlotArray = new PmxSlotData[] { boneSlot, morphSlot }; }
public void GetData(PmxModelData data) { var header = new PmxHeaderData { Version = 2.0F, ModelName = World.ModelName, Description = World.ModelDescription, }; var boneSlot = new PmxSlotData { SlotName = "弾ボーン", Type = SlotType.BONE, Indices = Enumerable.Range(1, Bones.BoneList.Count - 1).ToArray() }; var morphSlot = new PmxSlotData { SlotName = "弾モーフ", Type = SlotType.MORPH, Indices = Enumerable.Range(0, Morphs.MorphList.Count).ToArray() }; data.Header = header; data.VertexIndices = Vertices.IndexList.ToArray(); data.TextureFiles = Materials.TextureList.ToArray(); data.VertexArray = Vertices.VertexList.ToArray(); data.MaterialArray = Materials.MaterialList.ToArray(); data.BoneArray = Bones.BoneList.ToArray(); data.MorphArray = Morphs.MorphList.ToArray(); data.SlotArray = new PmxSlotData[] { boneSlot, morphSlot }; }