コード例 #1
0
        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 };
        }