public override int[] CreateVertexIndices(World wolrd, ShotProperty prop) { int[] result = new int[Data.VertexIndices.Length]; Array.Copy(Data.VertexIndices, result, Data.VertexIndices.Length); return(result); }
public override string[] CreateTextures(World wolrd, ShotProperty prop) { string[] result = new string[Data.TextureFiles.Length]; Array.Copy(Data.TextureFiles, result, Data.TextureFiles.Length); return(result); }
public void SetupMaterials(ShotProperty prop, PmxMaterialData[] materials, string[] textures) { foreach (var texture in textures) { if (!TextureList.Contains(texture)) { TextureList.Add(texture); } } foreach (PmxMaterialData material in materials) { material.MaterialName = "MA_" + MaterialList.Count.ToString(); if (0 <= material.TextureId && material.TextureId < textures.Length) { material.TextureId = TextureList.IndexOf(textures[material.TextureId]); } else { material.TextureId = -1; } if (0 <= material.SphereId && material.SphereId < textures.Length) { material.SphereId = TextureList.IndexOf(textures[material.SphereId]); } else { material.SphereId = -1; } MaterialList.Add(material); } }
public void SetupMaterialMorph(ShotProperty prop, PmxMorphData morph, int materialCount, int appliedMaterialCount) { morph.MorphName = "MO_" + MorphList.Count.ToString(); morph.SlotType = MorphSlotType.RIP; morph.MorphType = MorphType.MATERIAL; morph.MorphArray = new IPmxMorphTypeData[appliedMaterialCount]; for (int i = 0; i < appliedMaterialCount; i++) { morph.MorphArray[i] = new PmxMorphMaterialData() { CalcType = 0, Ambient = new Vector3(1, 1, 1), Diffuse = new Vector4(1, 1, 1, 0), Specular = new Vector3(1, 1, 1), Shininess = 1.0F, Edge = new Vector4(1, 1, 1, 1), EdgeThick = 1.0F, Texture = new Vector4(1, 1, 1, 1), SphereTexture = new Vector4(1, 1, 1, 1), ToonTexture = new Vector4(1, 1, 1, 1), }; } for (int i = 0; i < appliedMaterialCount; i++) { morph.MorphArray[i].Index = materialCount + i; } MorphList.Add(morph); }
public override PmxBoneData[] CreateBones(World wolrd, ShotProperty prop) { PmxBoneData[] result = new PmxBoneData[Data.BoneArray.Length]; for (int i = 0; i < result.Length; i++) { result[i] = CloneUtil.Clone(Data.BoneArray[i]); } return(result); }
public abstract PmxVertexData[] CreateVertices(World wolrd, ShotProperty prop);
public abstract int[] CreateVertexIndices(World wolrd, ShotProperty prop);
public abstract string[] CreateTextures(World wolrd, ShotProperty prop);
public abstract PmxMaterialData[] CreateMaterials(World wolrd, ShotProperty prop);
public abstract PmxBoneData[] CreateBones(World wolrd, ShotProperty prop);