Matrix4x4f

Summary

Represents a 4x4 single-precision floating-point matrix arranged in row-major layout, commonly utilised for 3D affine transformations.

Definition

Namespace: SDT4.Managed.Core.Math
Assembly: SDT4.Managed.Core.dll

struct Matrix4x4f
Implements:

IMatrixSpatial<Single, Vector4f, Matrix4x4f>, ISerializable, IEquatable<Matrix4x4f>

Fields

Name Type Description
public m00 Single Value at row 0, column 0.
public m01 Single Value at row 0, column 1.
public m02 Single Value at row 0, column 2.
public m03 Single Value at row 0, column 3.
public m10 Single Value at row 1, column 0.
public m11 Single Value at row 1, column 1.
public m12 Single Value at row 1, column 2.
public m13 Single Value at row 1, column 3.
public m20 Single Value at row 2, column 0.
public m21 Single Value at row 2, column 1.
public m22 Single Value at row 2, column 2.
public m23 Single Value at row 2, column 3.
public m30 Single Value at row 3, column 0.
public m31 Single Value at row 3, column 1.
public m32 Single Value at row 3, column 2.
public m33 Single Value at row 3, column 3.

Properties

Name Type Description
public static get; Zero Matrix4x4f Gets a 4x4 matrix with all elements set to zero.
public static get; Identity Matrix4x4f Gets the 4x4 multiplicative identity matrix.
public get; Item Single Gets the element at the specified row and column indices.
public get; Item Vector4f Gets the row vector at the specified index.
public get; IsOrthoNormal Boolean Gets a value indicating whether all 4 basis vectors are mutually orthogonal and normalised to unit length.
public get; IsOrthoNormal3x3 Boolean Gets a value indicating whether the upper-left 3x3 rotational submatrix is orthonormal.

Methods

public static Matrix4x4f FromColumns(Vector4f col0, Vector4f col1, Vector4f col2, Vector4f col3)

Summary: Constructs a 4x4 matrix from column vectors.

Parameters:

Returns:


public static Matrix4x4f FromRows(Vector4f row0, Vector4f row1, Vector4f row2, Vector4f row3)

Summary: Constructs a 4x4 matrix from row vectors.

Parameters:

Returns:


public Vector4f GetColumn(Int32 col)

Summary: Retrieves the column vector at the specified index.

Parameters:

Returns:


public Vector4f GetRow(Int32 row)

Summary: Retrieves the row vector at the specified index.

Parameters:

Returns:


public Void SetColumn(Int32 col, Vector4f vec)

Summary: Sets the column vector at the specified index.

Parameters:


public Void SetRow(Int32 row, Vector4f vec)

Summary: Sets the row vector at the specified index.

Parameters:


public Matrix3x3f ToMatrix3x3()

Summary: Extracts the upper-left 3x3 submatrix containing the rotational and scaling components.

Returns:


public Single Determinant()

Summary: Calculates the scalar determinant of the 4x4 matrix.

Returns:


public Matrix4x4f Transposed()

Summary: Returns a transposed copy of the matrix with rows and columns swapped.

Returns:


public Matrix4x4f Inverse()

Summary: Calculates the multiplicative inverse of the matrix.

Returns:


public EulerAngle ToEulerAngle(EulerOrder order)

Summary: Decomposes the upper-left 3x3 rotation portion of this matrix into Euler angles according to a specified rotation sequence.

Parameters:

Returns:


public Quaternion ToQuaternion()

Summary: Converts the upper-left 3x3 rotation portion of this matrix into an equivalent rotation quaternion.

Returns:


public Boolean Equals(Matrix4x4f other)

Summary: Determines whether the specified Matrix4x4f is equal to the current instance.

Parameters:

Returns:


public virtual Boolean Equals(Object? obj)

Summary: Determines whether the specified object is a Matrix4x4f and is equal to the current instance.

Parameters:

Returns:


public virtual Int32 GetHashCode()

Summary: Returns the hash code for this matrix.

Returns:


public virtual String ToString()

Summary: Returns a culture-invariant string representation of the matrix.

Returns:


public Void GetObjectData(SerializationInfo info, StreamingContext context)

Summary: Populates a SerializationInfo with the data needed to serialise the matrix.

Parameters: