Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CopyBoneTransformsFrom()

void Microsoft.Xna.Framework.Graphics.Model.CopyBoneTransformsFrom ( Matrix[] sourceBoneTransforms)
inline

Definition at line 86 of file Model.cs.

87 {
88 if (sourceBoneTransforms == null)
89 {
90 throw new ArgumentNullException("sourceBoneTransforms");
91 }
92 if (sourceBoneTransforms.Length < bones.Count)
93 {
94 throw new ArgumentOutOfRangeException("sourceBoneTransforms");
95 }
96 int count = bones.Count;
97 for (int i = 0; i < count; i++)
98 {
99 bones[i].transform = sourceBoneTransforms[i];
100 }
101 }

References Microsoft.Xna.Framework.Graphics.Model.bones, System.count, and System.Collections.ObjectModel.ReadOnlyCollection< T >.Count.