Public Member Functions | |
| void | set (vec4 a, vec4 b, vec4 c, vec4 d) |
| Set this matrix. | |
| void | set (float aa, float ab, float ac, float ad, float ba, float bb, float bc, float bd, float ca, float cb, float cc, float cd, float da, float db, float dc, float dd) |
| Set this matrix. | |
| mat4 | scale (float x, float y, float z) |
| Multiply by a scaling matrix. | |
| mat4 | scale (vec3 amount) |
| Multiply by a scaling matrix. | |
| mat4 | scale (vec4 amount) |
| Multiply by a scaling matrix. | |
| mat4 | translate (float x, float y, float z) |
| Multiply by a translation matrix. | |
| mat4 | translate (vec3 amount) |
| Multiply by a translation matrix. | |
| mat4 | rotateDeg (float angle, float x, float y, float z) |
| Multiply by a rotation matrix. | |
| mat4 | rotateDeg (float angle, vec3 v) |
| Multiply by a rotation matrix. | |
| bit | isIdentity () |
| Return whether this is an identity matrix. | |
| void | set (int row, int col, float value) |
| Set a cell on the matrix. | |
| float | get (int row, int col) |
| Get a cell on the matrix. | |
| void | row (int row, float a, float b, float c, float d) |
| Set a row on the matrix. | |
| void | row (int row, vec4 vec) |
| Set a row on the matrix. | |
| vec4 | row (int row) |
| Get a row on the matrix. | |
| vec4 | col (int col) |
| Get a column on the matrix. | |
| vec3 | col3 (int col) |
| Get a column on the matrix as a vec3. | |
| void | col (int col, float a, float b, float c, float d) |
| Set a column on the matrix. | |
| void | col (int col, vec4 vec) |
| Set a column on the matrix. | |
| vec4 | diag () |
| Get the diagonal (which encodes the simple scale). | |
| float[] | array () |
| Get the full 16-cell array. | |
| mat4 | swizzle (int a, int b, int c, int d) |
| Swizzle. | |
| vec3 | rotate (vec3 v) |
| Rotate the vector, ignoring the w component. | |
| vec3 | rotateNormal (vec3 v) |
| Rotate the vector, ignoring the w component, and renormalize the vector if necessary. | |
| mat4 | transpose () |
| Get the transpose matrix. | |
| bit | parity () |
| Get whether the parity is positive. | |
| mat4 | mul (float v) |
| Multiply by scalar. | |
| mat4 | mul (mat4 mb) |
| Multiply matrices. | |
| vec2 | mul (vec2 v) |
| Multiply matrix by zero and one-extended vector. | |
| vec3 | mul (vec3 v) |
| Multiply matrix by one-extended vector. | |
| vec4 | mul (vec4 v) |
| Multiply matrix by vector. | |
| float | cofactor (int row, int col) |
| Compute the cofactor of a cell, stolen from Pierre Terdiman. | |
| mat4 | cofactorMatrix () |
| Compute a matrix filled with cofactors of this matrix. | |
| float | determinant () |
| Compute the determinant of this matrix. | |
| mat4 | invert () |
| Invert matrix, throws if singular. | |
| mat4 | rotationOnly () |
| Return the rotation and scaling factors of the matrix. | |
| bit | eq (mat4 b) |
| Test for equality. | |
| void | print () |
| Print the matrix. | |
| char[] | toString () |
| Convert to a four-line string. | |
| quat3 | toquat3 () |
| Return the quaternion component from the matrix. | |
Static Public Member Functions | |
| mat4 | create (vec4 a, vec4 b, vec4 c, vec4 d) |
| Create a matrix using normal order. | |
| mat4 | create (float aa, float ab, float ac, float ad, float ba, float bb, float bc, float bd, float ca, float cb, float cc, float cd, float da, float db, float dc, float dd) |
| Create a matrix. | |
| mat4 | create (mat3 base) |
| Create a matrix by extending a 3x3 matrix with identity. | |
| mat4 | identity () |
| Get the identity matrix. | |
| mat4 | scaling (float x, float y, float z) |
| Get a scaling matrix. | |
| mat4 | scaling (vec3 amount) |
| Get a scaling matrix. | |
| mat4 | scaling (vec4 amount) |
| Get a scaling matrix. | |
| mat4 | translation (float x, float y, float z) |
| Get a translation matrix. | |
| mat4 | translation (vec3 v) |
| Get a translation matrix. | |
| mat4 | rotationDeg (float angle, float x, float y, float z) |
| Get a rotation matrix. | |
| mat4 | rotationDeg (float angle, vec3 v) |
| Get a rotation matrix. | |
|
||||||||||||
|
Multiply by a rotation matrix. angle is in degrees. |
|
||||||||||||||||||||
|
Multiply by a rotation matrix. angle is in degrees. |
|
||||||||||||
|
Get a rotation matrix. angle is in degrees. |
|
||||||||||||||||||||
|
Get a rotation matrix. angle is in degrees. |
1.3.2