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

◆ TransformNormal() [4/4]

static void Microsoft.Xna.Framework.Vector3.TransformNormal ( Vector3[] sourceArray,
ref Matrix matrix,
Vector3[] destinationArray )
inlinestatic

Definition at line 555 of file Vector3.cs.

556 {
557 if (sourceArray == null)
558 {
559 throw new ArgumentNullException("sourceArray");
560 }
561 if (destinationArray == null)
562 {
563 throw new ArgumentNullException("destinationArray");
564 }
565 if (destinationArray.Length < sourceArray.Length)
566 {
567 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
568 }
569 for (int i = 0; i < sourceArray.Length; i++)
570 {
571 float x = sourceArray[i].X;
572 float y = sourceArray[i].Y;
573 float z = sourceArray[i].Z;
574 destinationArray[i].X = x * matrix.M11 + y * matrix.M21 + z * matrix.M31;
575 destinationArray[i].Y = x * matrix.M12 + y * matrix.M22 + z * matrix.M32;
576 destinationArray[i].Z = x * matrix.M13 + y * matrix.M23 + z * matrix.M33;
577 }
578 }

References System.destinationArray, Microsoft.Xna.Framework.FrameworkResources.NotEnoughTargetSize, and System.sourceArray.