Constructs the matrix: If a single value is passed, the matrix will be cleared with this value (each column in each row will contain this value). If a matrix with more rows and columns is passed, the matrix will be the upper left nxm matrix. If a matrix with less rows and columns is passed, the passed matrix will be stored in the upper left of an identity matrix. It's also allowed to pass vectors and scalars at a time, but the vectors dimension must match the number of columns and align correctly.
Sets all values of the matrix to value (each column in each row will contain this value).
Returns the determinant of the current matrix (2x2, 3x3 and 4x4 matrices).
Returns an inverted copy of the current matrix (nxn matrices, 2 >= n <= 4).
Inverts the current matrix (nxn matrices, 2 >= n <= 4).
Returns true if all values are not nan and finite, otherwise false.
Makes the current matrix an identity matrix.
Returns the pointer to the stored values as OpenGL requires it. Note this will return a pointer to a row-major matrix, this means you've to set the transpose argument to GL_TRUE when passing it to OpenGL.
Rotates the current matrix around the x-axis and returns this (nxn matrices, n >= 3).
Rotates the current matrix around the y-axis and returns this (nxn matrices, n >= 3).
Rotates the current matrix around the z-axis and returns this (nxn matrices, n >= 3).
Copies rot into the upper left corner, the translation (nxn matrices, n >= 3).
Returns an identity matrix with the current rotation applied (nxn matrices, n >= 3).
Applys a scale to the current matrix and returns this (3x3 and 4x4 matrices).
Sets the scale of the matrix (nxn matrices, n >= 3).
Copyies the scale from mat to the current matrix (nxn matrices, n >= 3).
Returns an identity matrix with the current scale applied (nxn matrices, n >= 3).
Returns the current matrix as pretty formatted string.
Returns the current matrix formatted as flat string.
Applys a translation on the current matrix and returns this (3x3 and 4x4 matrices).
Sets the translation of the matrix (nxn matrices, n >= 3).
Copyies the translation from mat to the current matrix (nxn matrices, n >= 3).
Returns an identity matrix with the current translation applied (nxn matrices, n >= 3)..
Transposes the current matrix;
Returns a transposed copy of the matrix.
Returns a identity matrix.
Returns a look at matrix (4x4 and floating-point matrices only).
Returns an orthographic matrix (4x4 and floating-point matrices only).
Returns an inverse ortographic matrix (4x4 and floating-point matrices only).
Returns a perspective matrix (4x4 and floating-point matrices only).
Returns an inverse perspective matrix (4x4 and floating-point matrices only).
Returns an identity matrix with an applied rotateAxis around an arbitrary axis (nxn matrices, n >= 3).
Returns a scaling matrix (3x3 and 4x4 matrices);
Returns a translation matrix (3x3 and 4x4 matrices).
Returns an identity matrix with an applied rotation around the x-axis (nxn matrices, n >= 3).
Returns an identity matrix with an applied rotation around the y-axis (nxn matrices, n >= 3).
Returns an identity matrix with an applied rotation around the z-axis (nxn matrices, n >= 3).
Holds the matrix row-major in memory.
alias Matrix!(float, 4, 4) mat4; alias Matrix!(double, 3, 4) mat34d; alias Matrix!(real, 2, 2) mat2r;
Base template for all matrix-types.