public readonly struct Matrix3x3A 3×3 matrix: rotations and scales with no translation. The type Numerics does not have, and the one a shader wants for normals — nine floats instead of sixteen, in a constant buffer that is read per vertex.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Same conventions as Matrix4x4: row-vector, row-major, composing left to right.
Fields and properties (14)
public const int ComponentCountNumber of components.
public readonly float M11Row 1, column 1.
public readonly float M12Row 1, column 2.
public readonly float M13Row 1, column 3.
public readonly float M21Row 2, column 1.
public readonly float M22Row 2, column 2.
public readonly float M23Row 2, column 3.
public readonly float M31Row 3, column 1.
public readonly float M32Row 3, column 2.
public readonly float M33Row 3, column 3.
public static Matrix3x3 IdentityThe transform that does nothing.
public Vector3 Row1The first row.
public Vector3 Row2The second row.
public Vector3 Row3The third row.
Methods (23)
public Matrix3x3(float m11, float m12, float m13, float m21, float m22, float m23, float m31, float m32, float m33)Builds a matrix from its nine elements, in row-major order.
public Matrix3x3(Vector3 row1, Vector3 row2, Vector3 row3)Builds a matrix from its three rows.
public ReadOnlySpan<float> AsSpan()The elements in row-major order. Valid as long as the matrix it came from.
public static Matrix3x3 FromMatrix4x4(in Matrix4x4 matrix)The upper-left 3×3 of a 4×4 — its rotation and scale, without the translation.
public static Matrix3x3 FromQuaternion(Quaternion rotation)The rotation a quaternion describes, as a 3×3 matrix.
public static Matrix3x3 FromScale(Vector3 scale)Scales each axis independently.
public static Matrix3x3 Normal(in Matrix4x4 modelToWorld)The matrix that transforms normals under : the inverse transpose of its upper-left 3×3.
public static Matrix3x3 Multiply(in Matrix3x3 left, in Matrix3x3 right)Composes two transforms: apply , then .
public static Matrix3x3 Transpose(in Matrix3x3 matrix)Transposes the matrix.
public static float Determinant(in Matrix3x3 matrix)The determinant.
public static bool Invert(in Matrix3x3 matrix, out Matrix3x3 result)Inverts the matrix.
public static Vector3 Transform(Vector3 value, in Matrix3x3 matrix)Transforms a vector: v * M.
public static bool NearEqual(in Matrix3x3 left, in Matrix3x3 right, float tolerance = 1E-06)Whether two matrices agree to within a tolerance, element by element.
public static Matrix3x3 operator *(Matrix3x3 left, Matrix3x3 right)public static Vector3 operator *(Vector3 value, Matrix3x3 matrix)Transforms a row vector: v * M.
public static bool operator ==(Matrix3x3 left, Matrix3x3 right)Exact element-wise equality, IEEE semantics. See NearEqual.
public static bool operator !=(Matrix3x3 left, Matrix3x3 right)The negation of op_Equality.
public bool Equals(Matrix3x3 other)Indicates whether the current object is equal to another object of the same type.
public override bool Equals(object? obj)Indicates whether this instance and a specified object are equal.
public override int GetHashCode()Returns the hash code for this instance.
public override string ToString()Returns the fully qualified type name of this instance.
public string ToString(string? format, IFormatProvider? formatProvider)Formats the value of the current instance using the specified format.
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default(ReadOnlySpan<char>), IFormatProvider? provider = null)Tries to format the value of the current instance into the provided span of characters.
Used by (10)
- AlgebraicPropertyTestsVixen.Core.Mathematics.Tests
- EffectLoaderVixen.Shaders
- GeneratedBindingsTestsVixen.Shaders.Tests
- LightingConstantsVixen.Shaders.Tests
- LightingKeysVixen.Shaders.Tests
- ShaderConstantsVixen.Shaders
- TransformTestsVixen.Core.Mathematics.Tests
- TypeRegistrationVixen.Core.Mathematics
- VectorTestsVixen.Core.Mathematics.Tests
- Vixen_Core_Mathematics_Matrix3x3SerializerVixen.Core.Mathematics