예제 #1
0
        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);
        }
예제 #2
0
 public void AddWeight(float weight, int boneIndex)
 {
     Weights.Add(weight);
     BoneIndices.Add(boneIndex);
     WeightCount++;
 }