Engines/FlatRedBallXNA/FlatRedBall.Content/ModelAnimation/X File/XMeshImporter.cs
/// <summary>
/// Converts the bone weight collections into working vertex channels by using the
/// provided bone index dictionary.  Converts bone names into indices.
/// </summary>
/// <param name="boneIndices">A dictionary that maps bone names to their indices</param>
Converts the bone weight collections into working vertex channels by using the
provided bone index dictionary.  Converts bone names into indices.
Converts the bone weight collections into working vertex channels by using the provided bone index dictionary . Converts bone names into indices .
public void AddWeights(Dictionary<string, int> boneIndices)
            {
                if (!isSkinned)
                    return;
                Dictionary<string, int> meshBoneIndices = new Dictionary<string, int>();
                int currentIndex = 0;
                foreach (KeyValuePair<string, int> k in boneIndices)
                {
                    if (skinTransformDictionary.ContainsKey(k.Key))
                    {
                        meshBoneIndices.Add(k.Key, currentIndex++);
                        SkinTransformContent transform = new SkinTransformContent();
                        transform.BoneName = k.Key;
                        transform.Transform = skinTransformDictionary[k.Key];
                        skinTransforms.Add(transform);
                    }
                }
            }
public void AddWeights ( Dictionary < string , int > boneIndices ) { if ( ! isSkinned ) return ; Dictionary < string , int > meshBoneIndices = new Dictionary < string , int > ( ) ; int currentIndex = 0 ; foreach ( KeyValuePair < string , int > k in boneIndices ) { if ( skinTransformDictionary . ContainsKey ( k . Key ) ) { meshBoneIndices . Add ( k . Key , currentIndex ++ ) ; SkinTransformContent transform = new SkinTransformContent ( ) ; transform . BoneName = k . Key ; transform . Transform = skinTransformDictionary [ k . Key ] ; skinTransforms . Add ( transform ) ; } } }
Converts the bone weight collections into working vertex channels by using the
provided bone index dictionary.
Converts the bone weight collections into working vertex channels by using the provided bone index dictionary .
// The bone indices are already sorted by index
boneIndices
Dictionary<string, int>
A dictionary that maps bone names to their indices
A dictionary that maps bone names to their indices