2 instantiations of Matrix4x4
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
103P13 = new Matrix4x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16),
Microsoft.Maui (1)
Platform\Standard\ViewExtensions.cs (1)
70 internal static System.Numerics.Matrix4x4 GetViewTransform(this IView view) => new System.Numerics.Matrix4x4();
149 references to Matrix4x4
Microsoft.Gen.Logging.Generated.Tests (1)
parent\TestClasses\LogPropertiesSpecialTypesExtensions.cs (1)
30public Matrix4x4 P13 { get; set; }
Microsoft.Maui (7)
Platform\Standard\ViewExtensions.cs (1)
70 internal static System.Numerics.Matrix4x4 GetViewTransform(this IView view) => new System.Numerics.Matrix4x4();
Platform\ViewExtensions.cs (4)
34 internal static Vector3 ExtractPosition(this Matrix4x4 matrix) => matrix.Translation; 36 internal static Vector3 ExtractScale(this Matrix4x4 matrix) => new Vector3(matrix.M11, matrix.M22, matrix.M33); 38 internal static double ExtractAngleInRadians(this Matrix4x4 matrix) => Math.Atan2(matrix.M21, matrix.M11); 40 internal static double ExtractAngleInDegrees(this Matrix4x4 matrix) => ExtractAngleInRadians(matrix) * 180 / Math.PI;
VisualDiagnostics\AdornerModel.cs (1)
19 public void Update(Rect rect, Thickness margin, Matrix4x4 transformToRoot, double density)
VisualDiagnostics\RectangleAdorner.cs (1)
87 Matrix4x4 transform = VisualView.GetViewTransform();
netstandard (1)
netstandard.cs (1)
1334[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix4x4))]
System.Numerics (1)
System.Numerics.cs (1)
7[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix4x4))]
System.Numerics.Vectors (1)
src\runtime\artifacts\obj\System.Numerics.Vectors\Release\net11.0\System.Numerics.Vectors.Forwards.cs (1)
8[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix4x4))]
System.Private.CoreLib (138)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.cs (120)
18public partial struct Matrix4x4 : IEquatable<Matrix4x4> 40internal ref Impl AsImpl() => ref Unsafe.As<Matrix4x4, Impl>(ref this); 44internal readonly ref readonly Impl AsROImpl() => ref Unsafe.As<Matrix4x4, Impl>(ref Unsafe.AsRef(in this)); 50public ref Matrix4x4 AsM4x4() => ref Unsafe.As<Impl, Matrix4x4>(ref this); 122/// <summary>Initializes a <see cref="Matrix4x4"/> using the specified elements.</summary> 153/// <summary>Initializes a <see cref="Matrix4x4" /> using the specified <see cref="Matrix3x2" />.</summary> 164public static Matrix4x4 Identity 483/// <remarks>The <see cref="op_Addition" /> method defines the operation of the addition operator for <see cref="Matrix4x4" /> objects.</remarks> 485public static Matrix4x4 operator +(Matrix4x4 value1, Matrix4x4 value2) 506public static bool operator ==(Matrix4x4 value1, Matrix4x4 value2) 522public static bool operator !=(Matrix4x4 value1, Matrix4x4 value2) 537/// <remarks>The <see cref="Matrix4x4.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix4x4" /> objects.</remarks> 538public static Matrix4x4 operator *(Matrix4x4 value1, Matrix4x4 value2) 557/// <remarks>The <see cref="Matrix4x4.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix4x4" /> objects.</remarks> 559public static Matrix4x4 operator *(Matrix4x4 value1, float value2) 577/// <remarks>The <see cref="op_Subtraction" /> method defines the operation of the subtraction operator for <see cref="Matrix4x4" /> objects.</remarks> 579public static Matrix4x4 operator -(Matrix4x4 value1, Matrix4x4 value2) 598public static Matrix4x4 operator -(Matrix4x4 value) 617public static Matrix4x4 Add(Matrix4x4 value1, Matrix4x4 value2) => value1 + value2; 619/// <summary>Creates a <see cref="Matrix4x4" /> whose 16 elements are set to the specified value.</summary> 621/// <returns>A <see cref="Matrix4x4" /> whose 16 elements are set to <paramref name="value" />.</returns> 623public static Matrix4x4 Create(float value) 637/// <summary>Creates a <see cref="Matrix4x4" /> from the specified <see cref="Matrix3x2" />.</summary> 639/// <returns>A <see cref="Matrix4x4" /> that was initialized using the elements from <paramref name="value" />.</returns> 642public static Matrix4x4 Create(Matrix3x2 value) 656/// <summary>Creates a <see cref="Matrix4x4" /> whose 4 rows are set to the specified value.</summary> 658/// <returns>A <see cref="Matrix4x4" /> whose 4 rows are set to <paramref name="value" />.</returns> 660public static Matrix4x4 Create(Vector4 value) 674/// <summary>Creates a <see cref="Matrix4x4" /> from the specified rows.</summary> 679/// <returns>A <see cref="Matrix4x4" /> whose rows are set to the specified values.</returns> 681public static Matrix4x4 Create(Vector4 x, Vector4 y, Vector4 z, Vector4 w) 710/// <returns>A <see cref="Matrix4x4" /> whose elements are set to the specified values.</returns> 712public static Matrix4x4 Create(float m11, float m12, float m13, float m14, 733public static Matrix4x4 CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector) 764public static Matrix4x4 CreateBillboardLeftHanded(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector) 796public static Matrix4x4 CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector) 858public static Matrix4x4 CreateConstrainedBillboardLeftHanded(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector) 918public static Matrix4x4 CreateFromAxisAngle(Vector3 axis, float angle) 928public static Matrix4x4 CreateFromQuaternion(Quaternion quaternion) => CreateFromQuaternion(quaternion.AsVector128()).AsM4x4(); 976public static Matrix4x4 CreateFromYawPitchRoll(float yaw, float pitch, float roll) 988public static Matrix4x4 CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector) 1001public static Matrix4x4 CreateLookAtLeftHanded(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector) 1014public static Matrix4x4 CreateLookTo(Vector3 cameraPosition, Vector3 cameraDirection, Vector3 cameraUpVector) 1027public static Matrix4x4 CreateLookToLeftHanded(Vector3 cameraPosition, Vector3 cameraDirection, Vector3 cameraUpVector) 1057public static Matrix4x4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane) 1081public static Matrix4x4 CreateOrthographicLeftHanded(float width, float height, float zNearPlane, float zFarPlane) 1106public static Matrix4x4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane) 1138public static Matrix4x4 CreateOrthographicOffCenterLeftHanded(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane) 1173public static Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance) 1206public static Matrix4x4 CreatePerspectiveLeftHanded(float width, float height, float nearPlaneDistance, float farPlaneDistance) 1242public static Matrix4x4 CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance) 1282public static Matrix4x4 CreatePerspectiveFieldOfViewLeftHanded(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance) 1321public static Matrix4x4 CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance) 1363public static Matrix4x4 CreatePerspectiveOffCenterLeftHanded(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance) 1396public static Matrix4x4 CreateReflection(Plane value) 1418public static Matrix4x4 CreateRotationX(float radians) 1442public static Matrix4x4 CreateRotationX(float radians, Vector3 centerPoint) 1468public static Matrix4x4 CreateRotationY(float radians) 1492public static Matrix4x4 CreateRotationY(float radians, Vector3 centerPoint) 1518public static Matrix4x4 CreateRotationZ(float radians) 1542public static Matrix4x4 CreateRotationZ(float radians, Vector3 centerPoint) 1570public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale) 1589public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale, Vector3 centerPoint) 1605public static Matrix4x4 CreateScale(Vector3 scales) 1622public static Matrix4x4 CreateScale(Vector3 scales, Vector3 centerPoint) 1638public static Matrix4x4 CreateScale(float scale) 1655public static Matrix4x4 CreateScale(float scale, Vector3 centerPoint) 1672public static Matrix4x4 CreateShadow(Vector3 lightDirection, Plane plane) 1694public static Matrix4x4 CreateTranslation(Vector3 position) 1712public static Matrix4x4 CreateTranslation(float xPosition, float yPosition, float zPosition) 1740public static Matrix4x4 CreateViewport(float x, float y, float width, float height, float minDepth, float maxDepth) 1772public static Matrix4x4 CreateViewportLeftHanded(float x, float y, float width, float height, float minDepth, float maxDepth) 1795public static Matrix4x4 CreateWorld(Vector3 position, Vector3 forward, Vector3 up) 1818public static unsafe bool Decompose(Matrix4x4 matrix, out Vector3 scale, out Quaternion rotation, out Vector3 translation) 1973public static bool Invert(Matrix4x4 matrix, out Matrix4x4 result) 1976return Invert(in matrix.AsROImpl(), out Unsafe.As<Matrix4x4, Impl>(ref result)); 2233public static Matrix4x4 Lerp(Matrix4x4 matrix1, Matrix4x4 matrix2, float amount) 2254public static Matrix4x4 Multiply(Matrix4x4 value1, Matrix4x4 value2) => value1 * value2; 2261public static Matrix4x4 Multiply(Matrix4x4 value1, float value2) => value1 * value2; 2267public static Matrix4x4 Negate(Matrix4x4 value) => -value; 2274public static Matrix4x4 Subtract(Matrix4x4 value1, Matrix4x4 value2) => value1 - value2; 2280public static Matrix4x4 Transform(Matrix4x4 value, Quaternion rotation) 2345public static Matrix4x4 Transpose(Matrix4x4 matrix) => Transpose(in matrix.AsROImpl()).AsM4x4(); 2376/// <remarks>The current instance and <paramref name="obj" /> are equal if <paramref name="obj" /> is a <see cref="Matrix4x4" /> object and the corresponding elements of each matrix are equal.</remarks> 2379=> (obj is Matrix4x4 other) && Equals(other); 2385public readonly bool Equals(Matrix4x4 other) 2512/// <summary>Creates a new <see cref="Matrix4x4"/> with the element at the specified row and column set to the given value and the remaining elements set to the same value as that in the current matrix.</summary> 2516/// <returns>A <see cref="Matrix4x4" /> with the value of the element at index: [<paramref name="row"/>, <paramref name="column"/>] set to <paramref name="value" /> and the remaining elements set to the same value as that in the current matrix.</returns> 2523public readonly Matrix4x4 WithElement(int row, int column, float value) 2525Matrix4x4 result = this; 2530/// <summary>Creates a new <see cref="Matrix4x4"/> with the row at the specified index set to the given value and the remaining rows set to the same value as that in the current matrix.</summary> 2533/// <returns>A <see cref="Matrix4x4" /> with the value of the row at index: [<paramref name="index"/>] set to <paramref name="value" /> and the remaining rows set to the same value as that in the current matrix.</returns> 2536public readonly Matrix4x4 WithRow(int index, Vector4 value) 2538Matrix4x4 result = this;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Plane.cs (4)
157public static Plane Transform(Plane plane, Matrix4x4 matrix) 159Matrix4x4.Invert(matrix.AsROImpl(), out Matrix4x4.Impl inverseMatrix); 160return Vector4.Transform(plane.AsVector128(), Matrix4x4.Transpose(inverseMatrix)).AsPlane();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Quaternion.cs (2)
250public static Quaternion CreateFromRotationMatrix(Matrix4x4 matrix) => CreateFromRotationMatrix(in matrix.AsROImpl()).AsQuaternion(); 252internal static Vector128<float> CreateFromRotationMatrix(in Matrix4x4.Impl matrix)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (4)
951public static Vector2 Transform(Vector2 position, Matrix4x4 matrix) => Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector2(); 954internal static Vector128<float> Transform(Vector128<float> position, in Matrix4x4.Impl matrix) 991public static Vector2 TransformNormal(Vector2 normal, Matrix4x4 matrix) => TransformNormal(normal.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector2(); 994internal static Vector128<float> TransformNormal(Vector128<float> normal, in Matrix4x4.Impl matrix)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (4)
974public static Vector3 Transform(Vector3 position, Matrix4x4 matrix) => Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector3(); 977internal static Vector128<float> Transform(Vector128<float> position, in Matrix4x4.Impl matrix) 1000public static Vector3 TransformNormal(Vector3 normal, Matrix4x4 matrix) => TransformNormal(normal.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector3(); 1003internal static Vector128<float> TransformNormal(Vector128<float> normal, in Matrix4x4.Impl matrix)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (4)
1022public static Vector4 Transform(Vector2 position, Matrix4x4 matrix) => Vector2.Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector4(); 1036public static Vector4 Transform(Vector3 position, Matrix4x4 matrix) => Vector3.Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector4(); 1050public static Vector4 Transform(Vector4 vector, Matrix4x4 matrix) => Transform(vector.AsVector128(), in matrix.AsROImpl()).AsVector4(); 1053internal static Vector128<float> Transform(Vector128<float> vector, in Matrix4x4.Impl matrix)