sbylib.math.matrix

Undocumented in source.

Members

Aliases

mat1x1
alias mat1x1 = Matrix!(float, 1, 1)
Undocumented in source.
mat1x2
alias mat1x2 = Matrix!(float, 1, 2)
Undocumented in source.
mat1x3
alias mat1x3 = Matrix!(float, 1, 3)
Undocumented in source.
mat1x4
alias mat1x4 = Matrix!(float, 1, 4)
Undocumented in source.
mat2
alias mat2 = mat2x2
Undocumented in source.
mat2x1
alias mat2x1 = Matrix!(float, 2, 1)
Undocumented in source.
mat2x2
alias mat2x2 = Matrix!(float, 2, 2)
Undocumented in source.
mat2x3
alias mat2x3 = Matrix!(float, 2, 3)
Undocumented in source.
mat2x4
alias mat2x4 = Matrix!(float, 2, 4)
Undocumented in source.
mat3
alias mat3 = mat3x3
Undocumented in source.
mat3x1
alias mat3x1 = Matrix!(float, 3, 1)
Undocumented in source.
mat3x2
alias mat3x2 = Matrix!(float, 3, 2)
Undocumented in source.
mat3x3
alias mat3x3 = Matrix!(float, 3, 3)
Undocumented in source.
mat3x4
alias mat3x4 = Matrix!(float, 3, 4)
Undocumented in source.
mat4
alias mat4 = mat4x4
Undocumented in source.
mat4x1
alias mat4x1 = Matrix!(float, 4, 1)
Undocumented in source.
mat4x2
alias mat4x2 = Matrix!(float, 4, 2)
Undocumented in source.
mat4x3
alias mat4x3 = Matrix!(float, 4, 3)
Undocumented in source.
mat4x4
alias mat4x4 = Matrix!(float, 4, 4)
Undocumented in source.

Enums

isMatrix
eponymoustemplate isMatrix(T)
Undocumented in source.

Functions

approxEqual
bool approxEqual(Matrix!(T, U, V) a, Matrix!(T, U, V) b, T eps)

Returns true if the distance of each element is less than eps.

determinant
T determinant(Matrix!(T, 2, 2) m)

Get the determinant value of 2x2 matrix

determinant
T determinant(Matrix!(T, 3, 3) m)

Get the determinant value of 3x3 matrix

determinant
T determinant(Matrix!(T, 4, 4) m)

Get the determinant value of 4x4 matrix

diagonal
Vector!(T, U) diagonal(Matrix!(T, U, U) m)

Get diagonal component from matrix

diagonalizeForRealSym
Matrix!(T, U, U) diagonalizeForRealSym(Matrix!(T, U, U) m, T eps)

Calculate the diagonalize matrix of the target matrix.

getTranslation
Vector!(T, U - 1) getTranslation(Matrix!(T, U, U) m)

Get translation information from matrix

invert
Matrix!(T, 2, 2) invert(Matrix!(T, 2, 2) m)

Get 2x2 inverse matrix

invert
Matrix!(T, 3, 3) invert(Matrix!(T, 3, 3) m)

Get 3x3 inverse matrix

invert
Matrix!(T, 4, 4) invert(Matrix!(T, 4, 4) m)

Get 4x4 inverse matrix

isOrthogonal
bool isOrthogonal(Matrix!(T, U, U) m, T eps)

Returns true if the given matrix is orthogonal.

isSymmetric
bool isSymmetric(Matrix!(T, U, U) m, T eps)

Returns true if the given matrix is symmetric.

toMatrix3
Matrix!(T, 3, 3) toMatrix3(Matrix!(T, 4, 4) m)

Returns shrinked 3x3 matrix The last row and column of the target are removed.

toMatrix4
Matrix!(T, 4, 4) toMatrix4(Matrix!(T, 3, 3) m)

Returns expanded 4x4 matrix The last row and column of the result matrix are almost 0, but 3,3 element is 1.

toQuaternion
Quaternion!T toQuaternion(Matrix!(T, 3, 3) m)

Converts to quaternion.

transpose
Matrix!(T, V, U) transpose(Matrix!(T, U, V) m)

Returns transposed matrix.

Structs

Matrix
struct Matrix(T, uint U, uint V)

Matrix type

Meta