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

◆ Transform() [7/8]

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

Definition at line 497 of file Vector3.cs.

498 {
499 if (sourceArray == null)
500 {
501 throw new ArgumentNullException("sourceArray");
502 }
503 if (destinationArray == null)
504 {
505 throw new ArgumentNullException("destinationArray");
506 }
507 if (destinationArray.Length < sourceArray.Length)
508 {
509 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
510 }
511 for (int i = 0; i < sourceArray.Length; i++)
512 {
513 float x = sourceArray[i].X;
514 float y = sourceArray[i].Y;
515 float z = sourceArray[i].Z;
516 destinationArray[i].X = x * matrix.M11 + y * matrix.M21 + z * matrix.M31 + matrix.M41;
517 destinationArray[i].Y = x * matrix.M12 + y * matrix.M22 + z * matrix.M32 + matrix.M42;
518 destinationArray[i].Z = x * matrix.M13 + y * matrix.M23 + z * matrix.M33 + matrix.M43;
519 }
520 }

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