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

◆ TransformNormal() [3/4]

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

Definition at line 581 of file Vector3.cs.

582 {
583 if (sourceArray == null)
584 {
585 throw new ArgumentNullException("sourceArray");
586 }
587 if (destinationArray == null)
588 {
589 throw new ArgumentNullException("destinationArray");
590 }
591 if (sourceArray.Length < (long)sourceIndex + (long)length)
592 {
593 throw new ArgumentException(FrameworkResources.NotEnoughSourceSize);
594 }
595 if (destinationArray.Length < (long)destinationIndex + (long)length)
596 {
597 throw new ArgumentException(FrameworkResources.NotEnoughTargetSize);
598 }
599 while (length > 0)
600 {
601 float x = sourceArray[sourceIndex].X;
602 float y = sourceArray[sourceIndex].Y;
603 float z = sourceArray[sourceIndex].Z;
604 destinationArray[destinationIndex].X = x * matrix.M11 + y * matrix.M21 + z * matrix.M31;
605 destinationArray[destinationIndex].Y = x * matrix.M12 + y * matrix.M22 + z * matrix.M32;
606 destinationArray[destinationIndex].Z = x * matrix.M13 + y * matrix.M23 + z * matrix.M33;
607 sourceIndex++;
609 length--;
610 }
611 }

References System.destinationArray, System.destinationIndex, System.length, Microsoft.Xna.Framework.FrameworkResources.NotEnoughSourceSize, Microsoft.Xna.Framework.FrameworkResources.NotEnoughTargetSize, System.sourceArray, and System.sourceIndex.