public sbyte FindOrAddBoneIndex(string boneName) { for (int i = 0; i < BoneIndices.Count; i++) { if (ContainingFlver.Bones[BoneIndices[i]].Name == boneName) { return((sbyte)i); } } for (int i = 0; i < ContainingFlver.Bones.Count; i++) { if (ContainingFlver.Bones[i].Name == boneName) { BoneIndices.Add(i); return((sbyte)(BoneIndices.Count - 1)); } } return(-1); }
public void AddWeight(float weight, int boneIndex) { Weights.Add(weight); BoneIndices.Add(boneIndex); WeightCount++; }