Matrix3x3f
Summary
Represents a 3x3 single-precision floating-point matrix arranged in row-major layout.
Definition
Namespace: SDT4.Managed.Core.Math
Assembly: SDT4.Managed.Core.dll
struct Matrix3x3f
Implements:
IMatrixSpatial<Single, Vector3f, Matrix3x3f>, ISerializable, IEquatable<Matrix3x3f>
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 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 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. |
Properties
| Name | Type | Description |
|---|---|---|
public static get; Zero |
Matrix3x3f | Gets a 3x3 matrix with all elements set to zero. |
public static get; Identity |
Matrix3x3f | Gets the 3x3 multiplicative identity matrix. |
public get; Item |
Single | Gets the element at the specified row and column indices. |
public get; Item |
Vector3f | Gets the row vector at the specified index. |
public get; IsOrthoNormal |
Boolean | Gets a value indicating whether the matrix basis vectors are mutually orthogonal and normalised to unit length. |
Methods
public static Matrix3x3f FromColumns(Vector3f col0, Vector3f col1, Vector3f col2)
Summary: Constructs a 3x3 matrix from column vectors.
Parameters:
-
col0(Vector3f): The first column vector. -
col1(Vector3f): The second column vector. -
col2(Vector3f): The third column vector.
Returns:
- Matrix3x3f: A matrix containing the column vectors.
public static Matrix3x3f FromRows(Vector3f row0, Vector3f row1, Vector3f row2)
Summary: Constructs a 3x3 matrix from row vectors.
Parameters:
-
row0(Vector3f): The first row vector. -
row1(Vector3f): The second row vector. -
row2(Vector3f): The third row vector.
Returns:
- Matrix3x3f: A matrix containing the row vectors.
public Vector3f GetColumn(Int32 col)
Summary: Retrieves the column vector at the specified index.
Parameters:
col(Int32): The zero-based column index (0 to 2).
Returns:
- Vector3f: The column vector.
public Vector3f GetRow(Int32 row)
Summary: Retrieves the row vector at the specified index.
Parameters:
row(Int32): The zero-based row index (0 to 2).
Returns:
- Vector3f: The row vector.
public Void SetColumn(Int32 col, Vector3f vec)
Summary: Sets the column vector at the specified index.
Parameters:
-
col(Int32): The zero-based column index (0 to 2). -
vec(Vector3f): The vector to assign to the column.
public Void SetRow(Int32 row, Vector3f vec)
Summary: Sets the row vector at the specified index.
Parameters:
public Matrix4x4f ToMatrix4x4()
Summary: Promotes this 3x3 matrix to an affine 4x4 matrix with zero translation and homogeneous coordinates.
Returns:
- Matrix4x4f: A 4x4 transformation matrix.
public Single Determinant()
Summary: Calculates the scalar determinant of the 3x3 matrix.
Returns:
- Single: The determinant value.
public Matrix3x3f Transposed()
Summary: Returns a transposed copy of the matrix with rows and columns swapped.
Returns:
- Matrix3x3f: The transposed matrix.
public Matrix3x3f Inverse()
Summary: Calculates the multiplicative inverse of the matrix.
Returns:
- Matrix3x3f: The inverted matrix.
public EulerAngle ToEulerAngle(EulerOrder order)
Summary: Decomposes this rotation matrix into Euler angles according to a specified rotation sequence.
Parameters:
order(EulerOrder): The rotational axis sequence to extract. Defaults to EulerAngle.DefaultOrder.
Returns:
- EulerAngle: The resulting EulerAngle.
public Quaternion ToQuaternion()
Summary: Converts this orthonormal rotation matrix into an equivalent rotation quaternion.
Returns:
- Quaternion: A normalised Quaternion.
public Boolean Equals(Matrix3x3f other)
Summary: Determines whether the specified Matrix3x3f is equal to the current instance.
Parameters:
other(Matrix3x3f): The matrix to compare with this instance.
Returns:
- Boolean:
if all corresponding elements are equal; otherwise, .
public virtual Boolean Equals(Object? obj)
Summary: Determines whether the specified object is a Matrix3x3f and is equal to the current instance.
Parameters:
obj(Object?): The object to compare with this instance.
Returns:
- Boolean:
if the object is a Matrix3x3f and matches all elements; otherwise, .
public virtual Int32 GetHashCode()
Summary: Returns the hash code for this matrix.
Returns:
- Int32: A 32-bit signed integer hash code.
public virtual String ToString()
Summary: Returns a culture-invariant string representation of the matrix.
Returns:
- String: A formatted string displaying the matrix rows.
public Void GetObjectData(SerializationInfo info, StreamingContext context)
Summary: Populates a SerializationInfo with the data needed to serialise the matrix.
Parameters:
-
info(SerializationInfo): The SerializationInfo to populate with data. -
context(StreamingContext): The destination for this serialisation.