private static ms3d_vertex_t_BWs[] GetBoneIndiciesAndWeights(int[] boneIndices, float[] weights) { var result = new ms3d_vertex_t_BWs[4]; for (var i = 0; i < 4; i++) { result[i].BoneId = (sbyte)((i < boneIndices.Length) ? boneIndices[i] : -1); result[i].Weight = (byte)((i < weights.Length) ? weights[i] * 100.0f : 0); } return(result); }
public ms3d_vertex_t() { BoneIdsAndWeights = new ms3d_vertex_t_BWs[4]; Extra = new uint[2]; }