Engines/FlatRedBallXNA/FlatRedBall.Content/ModelAnimation/BoneIndexer.cs
/// <summary>
/// Creates an index for a bone if one doesn't exist, and returns the palette
/// index for the given bone.
/// </summary>
/// <param name="boneName">The name of the bone.</param>
/// <returns>The matrix palette index of the bone.</returns>
Creates an index for a bone if one doesn't exist, and returns the palette
index for the given bone.
Creates an index for a bone if one doesn ' t exist and returns the palette index for the given bone .
public byte GetBoneIndex(string boneName)
        {
            if (!dict.ContainsKey(boneName))
            {
                dict.Add(boneName, currentIndex);
                skinnedBoneNames.Add(boneName);
                currentIndex++;
                return (byte)(currentIndex - 1);
            }
            else
                return (byte)dict[boneName];
        }
public byte GetBoneIndex ( string boneName ) { if ( ! dict . ContainsKey ( boneName ) ) { dict . Add ( boneName , currentIndex ) ; skinnedBoneNames . Add ( boneName ) ; currentIndex ++ ; return ( byte ) ( currentIndex - 1 ) ; } else return ( byte ) dict [ boneName ] ; }
Creates an index for a bone if one doesn't exist, and returns the palette
index for the given bone.
Creates an index for a bone if one doesn ' t exist and returns the palette index for the given bone .
The matrix palette index of the bone.
The matrix palette index of the bone .
boneName
string
The name of the bone.
The name of the bone .