public override PmxVertexData[] CreateVertices(World wolrd, ShotProperty prop) { PmxVertexData[] result = new PmxVertexData[Data.VertexArray.Length]; for (int i = 0; i < result.Length; i++) { result[i] = CloneUtil.Clone(Data.VertexArray[i]); } return(result); }
public override PmxVertexData[] CreateVertices(World wolrd, ShotProperty prop) { PmxVertexData[] result = new PmxVertexData[OriginalData.VertexArray.Length]; for (int i = 0; i < result.Length; i++) { var clone = result[i] = CloneUtil.Clone(OriginalData.VertexArray[i]); clone.Pos = (Vector4)clone.Pos * prop.Scale; } return(result); }
static PmxVertexData MakeVert(Vector3 pos, Vector2 uv) { PmxVertexData pmxVertex = new PmxVertexData { Pos = pos, Uv = uv, BoneId = new int[] { 1 }, }; return(pmxVertex); }
public ShotModelData(World world, ShotProperty property) { Property = property; World = world; Bones = Property.Type.CreateBones(world, property); if (Property.Type.HasMesh) { Vertices = Property.Type.CreateVertices(world, property); Indices = Property.Type.CreateVertexIndices(world, property); Materials = Property.Type.CreateMaterials(world, property); Textures = Property.Type.CreateTextures(world, property); } else { Vertices = new PmxVertexData[0]; Indices = new int[0]; Materials = new PmxMaterialData[0]; Textures = new string[0]; } }
static TexturedVertex GetVert(PmxVertexData vert) { return(new TexturedVertex(vert.Pos, vert.Normal, vert.Uv)); }