System.Numerics.Matrix4x4
A structure encapsulating a 4x4 matrix.
Value at row 1, column 1 of the matrix.
Value at row 1, column 2 of the matrix.
Value at row 1, column 3 of the matrix.
Value at row 1, column 4 of the matrix.
Value at row 2, column 1 of the matrix.
Value at row 2, column 2 of the matrix.
Value at row 2, column 3 of the matrix.
Value at row 2, column 4 of the matrix.
Value at row 3, column 1 of the matrix.
Value at row 3, column 2 of the matrix.
Value at row 3, column 3 of the matrix.
Value at row 3, column 4 of the matrix.
Value at row 4, column 1 of the matrix.
Value at row 4, column 2 of the matrix.
Value at row 4, column 3 of the matrix.
Value at row 4, column 4 of the matrix.
Returns the multiplicative identity matrix.
Returns whether the matrix is the identity matrix.
Gets or sets the translation component of this matrix.
public Matrix4x4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
Constructs a Matrix4x4 from the given components.
Constructs a Matrix4x4 from the given Matrix3x2.
Adds two matrices together.
public static Matrix4x4 CreateBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 cameraUpVector, Vector3 cameraForwardVector)
Creates a spherical billboard that rotates around a specified object position.
public static Matrix4x4 CreateConstrainedBillboard(Vector3 objectPosition, Vector3 cameraPosition, Vector3 rotateAxis, Vector3 cameraForwardVector, Vector3 objectForwardVector)
Creates a cylindrical billboard that rotates around a specified axis.
Creates a matrix that rotates around an arbitrary vector.
Creates a rotation matrix from the given Quaternion rotation value.
Creates a rotation matrix from the specified yaw, pitch, and roll.
public static Matrix4x4 CreateLookAt(Vector3 cameraPosition, Vector3 cameraTarget, Vector3 cameraUpVector)
Creates a view matrix.
public static Matrix4x4 CreateOrthographic(float width, float height, float zNearPlane, float zFarPlane)
Creates an orthographic perspective matrix from the given view volume dimensions.
public static Matrix4x4 CreateOrthographicOffCenter(float left, float right, float bottom, float top, float zNearPlane, float zFarPlane)
Builds a customized, orthographic projection matrix.
public static Matrix4x4 CreatePerspective(float width, float height, float nearPlaneDistance, float farPlaneDistance)
Creates a perspective projection matrix from the given view volume dimensions.
public static Matrix4x4 CreatePerspectiveFieldOfView(float fieldOfView, float aspectRatio, float nearPlaneDistance, float farPlaneDistance)
Creates a perspective projection matrix based on a field of view, aspect ratio, and near and far view plane distances.
public static Matrix4x4 CreatePerspectiveOffCenter(float left, float right, float bottom, float top, float nearPlaneDistance, float farPlaneDistance)
Creates a customized, perspective projection matrix.
Creates a Matrix that reflects the coordinate system about a specified Plane.
Creates a matrix for rotating points around the X-axis.
Creates a matrix for rotating points around the X-axis, from a center point.
Creates a matrix for rotating points around the Y-axis.
Creates a matrix for rotating points around the Y-axis, from a center point.
Creates a matrix for rotating points around the Z-axis.
Creates a matrix for rotating points around the Z-axis, from a center point.
Creates a scaling matrix.
Creates a scaling matrix with a center point.
Creates a scaling matrix.
Creates a scaling matrix with a center point.
Creates a uniform scaling matrix that scales equally on each axis.
Creates a uniform scaling matrix that scales equally on each axis with a center point.
Creates a Matrix that flattens geometry into a specified Plane as if casting a shadow from a specified light source.
Creates a translation matrix.
Creates a translation matrix.
Creates a world matrix with the specified parameters.
public static bool Decompose(Matrix4x4 matrix, out Vector3 scale, out Quaternion rotation, out Vector3 translation)
Attempts to extract the scale, translation, and rotation components from the given scale/rotation/translation matrix.
If successful, the out parameters will contained the extracted values.
Attempts to calculate the inverse of the given matrix. If successful, result will contain the inverted matrix.
Linearly interpolates between the corresponding values of two matrices.
Multiplies a matrix by another matrix.
Multiplies a matrix by a scalar value.
Returns a new matrix with the negated elements of the given matrix.
Adds two matrices together.
Returns a boolean indicating whether the given two matrices are equal.
Returns a boolean indicating whether the given two matrices are not equal.
Multiplies a matrix by another matrix.
Multiplies a matrix by a scalar value.
Subtracts the second matrix from the first.
Returns a new matrix with the negated elements of the given matrix.
Subtracts the second matrix from the first.
Transforms the given matrix by applying the given Quaternion rotation.
Transposes the rows and columns of a matrix.
Returns a boolean indicating whether this matrix instance is equal to the other given matrix.
Calculates the determinant of the matrix.