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

◆ Transform() [4/8]

static Vector3 Microsoft.Xna.Framework.Vector3.Transform ( Vector3 value,
Quaternion rotation )
inlinestatic

Definition at line 451 of file Vector3.cs.

452 {
453 float num = rotation.X + rotation.X;
454 float num2 = rotation.Y + rotation.Y;
455 float num3 = rotation.Z + rotation.Z;
456 float num4 = rotation.W * num;
457 float num5 = rotation.W * num2;
458 float num6 = rotation.W * num3;
459 float num7 = rotation.X * num;
460 float num8 = rotation.X * num2;
461 float num9 = rotation.X * num3;
462 float num10 = rotation.Y * num2;
463 float num11 = rotation.Y * num3;
464 float num12 = rotation.Z * num3;
465 float x = value.X * (1f - num10 - num12) + value.Y * (num8 - num6) + value.Z * (num9 + num5);
466 float y = value.X * (num8 + num6) + value.Y * (1f - num7 - num12) + value.Z * (num11 - num4);
467 float z = value.X * (num9 - num5) + value.Y * (num11 + num4) + value.Z * (1f - num7 - num10);
468 Vector3 result = default(Vector3);
469 result.X = x;
470 result.Y = y;
471 result.Z = z;
472 return result;
473 }
Vector3(float x, float y, float z)
Definition Vector3.cs:66

References System.value, Microsoft.Xna.Framework.Quaternion.X, Microsoft.Xna.Framework.Quaternion.Y, and Microsoft.Xna.Framework.Quaternion.Z.