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();
144 references to Matrix4x4
Microsoft.Gen.Logging.Generated.Tests (1)
test\Generators\Microsoft.Gen.Logging\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)
artifacts\obj\System.Numerics.Vectors\Debug\net10.0\System.Numerics.Vectors.Forwards.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Numerics.Matrix4x4))]
System.Private.CoreLib (133)
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.cs (115)
14public partial struct Matrix4x4 : IEquatable<Matrix4x4> 93/// <summary>Initializes a <see cref="Matrix4x4"/> using the specified elements.</summary> 123/// <summary>Initializes a <see cref="Matrix4x4" /> using the specified <see cref="Matrix3x2" />.</summary> 133public static Matrix4x4 Identity 434/// <remarks>The <see cref="op_Addition" /> method defines the operation of the addition operator for <see cref="Matrix4x4" /> objects.</remarks> 436public static Matrix4x4 operator +(Matrix4x4 value1, Matrix4x4 value2) 445public static bool operator ==(Matrix4x4 value1, Matrix4x4 value2) 453public static bool operator !=(Matrix4x4 value1, Matrix4x4 value2) 460/// <remarks>The <see cref="Matrix4x4.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix4x4" /> objects.</remarks> 462public static Matrix4x4 operator *(Matrix4x4 value1, Matrix4x4 value2) => Create( 473/// <remarks>The <see cref="Matrix4x4.op_Multiply" /> method defines the operation of the multiplication operator for <see cref="Matrix4x4" /> objects.</remarks> 475public static Matrix4x4 operator *(Matrix4x4 value1, float value2) 482/// <remarks>The <see cref="op_Subtraction" /> method defines the operation of the subtraction operator for <see cref="Matrix4x4" /> objects.</remarks> 484public static Matrix4x4 operator -(Matrix4x4 value1, Matrix4x4 value2) 491public static Matrix4x4 operator -(Matrix4x4 value) 499public static Matrix4x4 Add(Matrix4x4 value1, Matrix4x4 value2) 502/// <summary>Creates a <see cref="Matrix4x4" /> whose 16 elements are set to the specified value.</summary> 504/// <returns>A <see cref="Matrix4x4" /> whose 16 elements are set to <paramref name="value" />.</returns> 506public static Matrix4x4 Create(float value) => Create(Vector4.Create(value)); 508/// <summary>Creates a <see cref="Matrix4x4" /> from the specified <see cref="Matrix3x2" />.</summary> 510/// <returns>A <see cref="Matrix4x4" /> that was initialized using the elements from <paramref name="value" />.</returns> 513public static Matrix4x4 Create(Matrix3x2 value) => Create( 520/// <summary>Creates a <see cref="Matrix4x4" /> whose 4 rows are set to the specified value.</summary> 522/// <returns>A <see cref="Matrix4x4" /> whose 4 rows are set to <paramref name="value" />.</returns> 524public static Matrix4x4 Create(Vector4 value) => Create(value, value, value, value); 526/// <summary>Creates a <see cref="Matrix4x4" /> from the specified rows.</summary> 531/// <returns>A <see cref="Matrix4x4" /> whose rows are set to the specified values.</returns> 533public static Matrix4x4 Create(Vector4 x, Vector4 y, Vector4 z, Vector4 w) 535Unsafe.SkipInit(out Matrix4x4 result); 562/// <returns>A <see cref="Matrix4x4" /> whose elements are set to the specified values.</returns> 564public static Matrix4x4 Create(float m11, float m12, float m13, float m14, 580public static Matrix4x4 CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector) 589public static Matrix4x4 CreateBillboardLeftHanded(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector) 599public static Matrix4x4 CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector) 609public static Matrix4x4 CreateConstrainedBillboardLeftHanded(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector) 616public static Matrix4x4 CreateFromAxisAngle(Vector3 axis, float angle) 622public static Matrix4x4 CreateFromQuaternion(Quaternion quaternion) 630public static Matrix4x4 CreateFromYawPitchRoll(float yaw, float pitch, float roll) 638public static Matrix4x4 CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector) 649public static Matrix4x4 CreateLookAtLeftHanded(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector) 660public static Matrix4x4 CreateLookTo(Vector3 cameraPosition, Vector3 cameraDirection, Vector3 cameraUpVector) 668public static Matrix4x4 CreateLookToLeftHanded(Vector3 cameraPosition, Vector3 cameraDirection, Vector3 cameraUpVector) 679public static Matrix4x4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane) 688public static Matrix4x4 CreateOrthographicLeftHanded(float width, float height, float zNearPlane, float zFarPlane) 699public static Matrix4x4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane) 710public static Matrix4x4 CreateOrthographicOffCenterLeftHanded(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane) 724public static Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance) 738public static Matrix4x4 CreatePerspectiveLeftHanded(float width, float height, float nearPlaneDistance, float farPlaneDistance) 755public static Matrix4x4 CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance) 772public static Matrix4x4 CreatePerspectiveFieldOfViewLeftHanded(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance) 788public static Matrix4x4 CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance) 804public static Matrix4x4 CreatePerspectiveOffCenterLeftHanded(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance) 810public static Matrix4x4 CreateReflection(Plane value) 816public static Matrix4x4 CreateRotationX(float radians) 823public static Matrix4x4 CreateRotationX(float radians, Vector3 centerPoint) 829public static Matrix4x4 CreateRotationY(float radians) 836public static Matrix4x4 CreateRotationY(float radians, Vector3 centerPoint) 842public static Matrix4x4 CreateRotationZ(float radians) 849public static Matrix4x4 CreateRotationZ(float radians, Vector3 centerPoint) 857public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale) 866public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale, Vector3 centerPoint) 872public static Matrix4x4 CreateScale(Vector3 scales) 879public static Matrix4x4 CreateScale(Vector3 scales, Vector3 centerPoint) 885public static Matrix4x4 CreateScale(float scale) 892public static Matrix4x4 CreateScale(float scale, Vector3 centerPoint) 899public static Matrix4x4 CreateShadow(Vector3 lightDirection, Plane plane) 905public static Matrix4x4 CreateTranslation(Vector3 position) 913public static Matrix4x4 CreateTranslation(float xPosition, float yPosition, float zPosition) 931public static Matrix4x4 CreateViewport(float x, float y, float width, float height, float minDepth, float maxDepth) 949public static Matrix4x4 CreateViewportLeftHanded(float x, float y, float width, float height, float minDepth, float maxDepth) 958public static Matrix4x4 CreateWorld(Vector3 position, Vector3 forward, Vector3 up) 967public static bool Decompose(Matrix4x4 matrix, out Vector3 scale, out Quaternion rotation, out Vector3 translation) 974public static bool Invert(Matrix4x4 matrix, out Matrix4x4 result) 986public static Matrix4x4 Lerp(Matrix4x4 matrix1, Matrix4x4 matrix2, float amount) 993public static Matrix4x4 Multiply(Matrix4x4 value1, Matrix4x4 value2) => value1 * value2; 1000public static Matrix4x4 Multiply(Matrix4x4 value1, float value2) 1007public static Matrix4x4 Negate(Matrix4x4 value) 1015public static Matrix4x4 Subtract(Matrix4x4 value1, Matrix4x4 value2) 1022public static Matrix4x4 Transform(Matrix4x4 value, Quaternion rotation) 1028public static Matrix4x4 Transpose(Matrix4x4 matrix) 1034/// <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> 1043public readonly bool Equals(Matrix4x4 other) 1082/// <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> 1086/// <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> 1093public readonly Matrix4x4 WithElement(int row, int column, float value) 1095Matrix4x4 result = this; 1100/// <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> 1103/// <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> 1106public readonly Matrix4x4 WithRow(int index, Vector4 value) 1108Matrix4x4 result = this;
src\libraries\System.Private.CoreLib\src\System\Numerics\Matrix4x4.Impl.cs (6)
23internal ref Impl AsImpl() => ref Unsafe.As<Matrix4x4, Impl>(ref this); 27internal readonly ref readonly Impl AsROImpl() => ref Unsafe.As<Matrix4x4, Impl>(ref Unsafe.AsRef(in this)); 33public ref Matrix4x4 AsM4x4() => ref Unsafe.As<Impl, Matrix4x4>(ref this); 952Impl matTemp = Matrix4x4.Identity.AsImpl(); 1607=> (obj is Matrix4x4 other) && Equals(in other.AsImpl());
src\libraries\System.Private.CoreLib\src\System\Numerics\Plane.cs (4)
146public static Plane Transform(Plane plane, Matrix4x4 matrix) 148Matrix4x4.Invert(matrix, out Matrix4x4 inverseMatrix); 149return Vector4.Transform(plane.AsVector4(), Matrix4x4.Transpose(inverseMatrix)).AsPlane();
src\libraries\System.Private.CoreLib\src\System\Numerics\Quaternion.cs (1)
228public static Quaternion CreateFromRotationMatrix(Matrix4x4 matrix)
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (2)
917public static Vector2 Transform(Vector2 position, Matrix4x4 matrix) => Vector4.Transform(position, matrix).AsVector2(); 943public static Vector2 TransformNormal(Vector2 normal, Matrix4x4 matrix)
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (2)
939public static Vector3 Transform(Vector3 position, Matrix4x4 matrix) => Vector4.Transform(position, matrix).AsVector3(); 953public static Vector3 TransformNormal(Vector3 normal, Matrix4x4 matrix)
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (3)
970public static Vector4 Transform(Vector2 position, Matrix4x4 matrix) 992public static Vector4 Transform(Vector3 position, Matrix4x4 matrix) 1015public static Vector4 Transform(Vector4 vector, Matrix4x4 matrix)