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

◆ CopyBoneTransformsTo()

void Microsoft.Xna.Framework.Graphics.Model.CopyBoneTransformsTo ( Matrix[] destinationBoneTransforms)
inline

Definition at line 40 of file Model.cs.

41 {
42 if (destinationBoneTransforms == null)
43 {
44 throw new ArgumentNullException("destinationBoneTransforms");
45 }
46 if (destinationBoneTransforms.Length < bones.Count)
47 {
48 throw new ArgumentOutOfRangeException("destinationBoneTransforms");
49 }
50 int count = bones.Count;
51 for (int i = 0; i < count; i++)
52 {
53 ref Matrix reference = ref destinationBoneTransforms[i];
54 reference = bones[i].transform;
55 }
56 }

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