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

◆ Transform() [15/16]

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

Definition at line 609 of file Vector4.cs.

610 {
611 if (sourceArray == null)
612 {
613 throw new ArgumentNullException("sourceArray");
614 }
615 if (destinationArray == null)
616 {
617 throw new ArgumentNullException("destinationArray");
618 }
619 if (destinationArray.Length < sourceArray.Length)
620 {
621 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
622 }
623 for (int i = 0; i < sourceArray.Length; i++)
624 {
625 float x = sourceArray[i].X;
626 float y = sourceArray[i].Y;
627 float z = sourceArray[i].Z;
628 float w = sourceArray[i].W;
629 destinationArray[i].X = x * matrix.M11 + y * matrix.M21 + z * matrix.M31 + w * matrix.M41;
630 destinationArray[i].Y = x * matrix.M12 + y * matrix.M22 + z * matrix.M32 + w * matrix.M42;
631 destinationArray[i].Z = x * matrix.M13 + y * matrix.M23 + z * matrix.M33 + w * matrix.M43;
632 destinationArray[i].W = x * matrix.M14 + y * matrix.M24 + z * matrix.M34 + w * matrix.M44;
633 }
634 }

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