2 instantiations of Matrix4x4
Microsoft.Gen.Logging.Generated.Tests (1)
LogPropertiesTests.cs (1)
103
P13 = 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)
30
public
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)
18
public partial struct Matrix4x4 : IEquatable<
Matrix4x4
>
40
internal ref Impl AsImpl() => ref Unsafe.As<
Matrix4x4
, Impl>(ref this);
44
internal readonly ref readonly Impl AsROImpl() => ref Unsafe.As<
Matrix4x4
, Impl>(ref Unsafe.AsRef(in this));
50
public 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>
164
public static
Matrix4x4
Identity
483
/// <remarks>The <see cref="op_Addition" /> method defines the operation of the addition operator for <see cref="
Matrix4x4
" /> objects.</remarks>
485
public static
Matrix4x4
operator +(
Matrix4x4
value1,
Matrix4x4
value2)
506
public static bool operator ==(
Matrix4x4
value1,
Matrix4x4
value2)
522
public 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>
538
public 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>
559
public 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>
579
public static
Matrix4x4
operator -(
Matrix4x4
value1,
Matrix4x4
value2)
598
public static
Matrix4x4
operator -(
Matrix4x4
value)
617
public 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>
623
public 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>
642
public 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>
660
public 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>
681
public 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>
712
public static
Matrix4x4
Create(float m11, float m12, float m13, float m14,
733
public static
Matrix4x4
CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector)
764
public static
Matrix4x4
CreateBillboardLeftHanded(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector)
796
public static
Matrix4x4
CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector)
858
public static
Matrix4x4
CreateConstrainedBillboardLeftHanded(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector)
918
public static
Matrix4x4
CreateFromAxisAngle(Vector3 axis, float angle)
928
public static
Matrix4x4
CreateFromQuaternion(Quaternion quaternion) => CreateFromQuaternion(quaternion.AsVector128()).AsM4x4();
976
public static
Matrix4x4
CreateFromYawPitchRoll(float yaw, float pitch, float roll)
988
public static
Matrix4x4
CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
1001
public static
Matrix4x4
CreateLookAtLeftHanded(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
1014
public static
Matrix4x4
CreateLookTo(Vector3 cameraPosition, Vector3 cameraDirection, Vector3 cameraUpVector)
1027
public static
Matrix4x4
CreateLookToLeftHanded(Vector3 cameraPosition, Vector3 cameraDirection, Vector3 cameraUpVector)
1057
public static
Matrix4x4
CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane)
1081
public static
Matrix4x4
CreateOrthographicLeftHanded(float width, float height, float zNearPlane, float zFarPlane)
1106
public static
Matrix4x4
CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)
1138
public static
Matrix4x4
CreateOrthographicOffCenterLeftHanded(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)
1173
public static
Matrix4x4
CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance)
1206
public static
Matrix4x4
CreatePerspectiveLeftHanded(float width, float height, float nearPlaneDistance, float farPlaneDistance)
1242
public static
Matrix4x4
CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)
1282
public static
Matrix4x4
CreatePerspectiveFieldOfViewLeftHanded(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)
1321
public static
Matrix4x4
CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance)
1363
public static
Matrix4x4
CreatePerspectiveOffCenterLeftHanded(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance)
1396
public static
Matrix4x4
CreateReflection(Plane value)
1418
public static
Matrix4x4
CreateRotationX(float radians)
1442
public static
Matrix4x4
CreateRotationX(float radians, Vector3 centerPoint)
1468
public static
Matrix4x4
CreateRotationY(float radians)
1492
public static
Matrix4x4
CreateRotationY(float radians, Vector3 centerPoint)
1518
public static
Matrix4x4
CreateRotationZ(float radians)
1542
public static
Matrix4x4
CreateRotationZ(float radians, Vector3 centerPoint)
1570
public static
Matrix4x4
CreateScale(float xScale, float yScale, float zScale)
1589
public static
Matrix4x4
CreateScale(float xScale, float yScale, float zScale, Vector3 centerPoint)
1605
public static
Matrix4x4
CreateScale(Vector3 scales)
1622
public static
Matrix4x4
CreateScale(Vector3 scales, Vector3 centerPoint)
1638
public static
Matrix4x4
CreateScale(float scale)
1655
public static
Matrix4x4
CreateScale(float scale, Vector3 centerPoint)
1672
public static
Matrix4x4
CreateShadow(Vector3 lightDirection, Plane plane)
1694
public static
Matrix4x4
CreateTranslation(Vector3 position)
1712
public static
Matrix4x4
CreateTranslation(float xPosition, float yPosition, float zPosition)
1740
public static
Matrix4x4
CreateViewport(float x, float y, float width, float height, float minDepth, float maxDepth)
1772
public static
Matrix4x4
CreateViewportLeftHanded(float x, float y, float width, float height, float minDepth, float maxDepth)
1795
public static
Matrix4x4
CreateWorld(Vector3 position, Vector3 forward, Vector3 up)
1818
public static unsafe bool Decompose(
Matrix4x4
matrix, out Vector3 scale, out Quaternion rotation, out Vector3 translation)
1973
public static bool Invert(
Matrix4x4
matrix, out
Matrix4x4
result)
1976
return Invert(in matrix.AsROImpl(), out Unsafe.As<
Matrix4x4
, Impl>(ref result));
2233
public static
Matrix4x4
Lerp(
Matrix4x4
matrix1,
Matrix4x4
matrix2, float amount)
2254
public static
Matrix4x4
Multiply(
Matrix4x4
value1,
Matrix4x4
value2) => value1 * value2;
2261
public static
Matrix4x4
Multiply(
Matrix4x4
value1, float value2) => value1 * value2;
2267
public static
Matrix4x4
Negate(
Matrix4x4
value) => -value;
2274
public static
Matrix4x4
Subtract(
Matrix4x4
value1,
Matrix4x4
value2) => value1 - value2;
2280
public static
Matrix4x4
Transform(
Matrix4x4
value, Quaternion rotation)
2345
public 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);
2385
public 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>
2523
public readonly
Matrix4x4
WithElement(int row, int column, float value)
2525
Matrix4x4
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>
2536
public readonly
Matrix4x4
WithRow(int index, Vector4 value)
2538
Matrix4x4
result = this;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Plane.cs (4)
157
public static Plane Transform(Plane plane,
Matrix4x4
matrix)
159
Matrix4x4
.Invert(matrix.AsROImpl(), out
Matrix4x4
.Impl inverseMatrix);
160
return Vector4.Transform(plane.AsVector128(),
Matrix4x4
.Transpose(inverseMatrix)).AsPlane();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Quaternion.cs (2)
250
public static Quaternion CreateFromRotationMatrix(
Matrix4x4
matrix) => CreateFromRotationMatrix(in matrix.AsROImpl()).AsQuaternion();
252
internal static Vector128<float> CreateFromRotationMatrix(in
Matrix4x4
.Impl matrix)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (4)
951
public static Vector2 Transform(Vector2 position,
Matrix4x4
matrix) => Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector2();
954
internal static Vector128<float> Transform(Vector128<float> position, in
Matrix4x4
.Impl matrix)
991
public static Vector2 TransformNormal(Vector2 normal,
Matrix4x4
matrix) => TransformNormal(normal.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector2();
994
internal static Vector128<float> TransformNormal(Vector128<float> normal, in
Matrix4x4
.Impl matrix)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (4)
974
public static Vector3 Transform(Vector3 position,
Matrix4x4
matrix) => Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector3();
977
internal static Vector128<float> Transform(Vector128<float> position, in
Matrix4x4
.Impl matrix)
1000
public static Vector3 TransformNormal(Vector3 normal,
Matrix4x4
matrix) => TransformNormal(normal.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector3();
1003
internal static Vector128<float> TransformNormal(Vector128<float> normal, in
Matrix4x4
.Impl matrix)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (4)
1022
public static Vector4 Transform(Vector2 position,
Matrix4x4
matrix) => Vector2.Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector4();
1036
public static Vector4 Transform(Vector3 position,
Matrix4x4
matrix) => Vector3.Transform(position.AsVector128Unsafe(), in matrix.AsROImpl()).AsVector4();
1050
public static Vector4 Transform(Vector4 vector,
Matrix4x4
matrix) => Transform(vector.AsVector128(), in matrix.AsROImpl()).AsVector4();
1053
internal static Vector128<float> Transform(Vector128<float> vector, in
Matrix4x4
.Impl matrix)