Matrix multiplication |
| #define | A(row, col) a[(col<<2)+row] |
| #define | B(row, col) b[(col<<2)+row] |
| #define | P(row, col) product[(col<<2)+row] |
| void | matmul4 (GLfloat *product, const GLfloat *a, const GLfloat *b) |
| | Perform a full 4x4 matrix multiplication. More...
|
| void | matmul34 (GLfloat *product, const GLfloat *a, const GLfloat *b) |
| | Multiply two matrices known to occupy only the top three rows, such as typical model matrices, and orthogonal matrices. More...
|
| void | matrix_multf (GLmatrix *mat, const GLfloat *m, GLuint flags) |
| | Multiply a matrix by an array of floats with known properties. More...
|
| void | _math_matrix_mul_matrix (GLmatrix *dest, const GLmatrix *a, const GLmatrix *b) |
| | Matrix multiplication. More...
|
| void | _math_matrix_mul_floats (GLmatrix *dest, const GLfloat *m) |
| | Matrix multiplication. More...
|
Matrix inversion |
| #define | SWAP_ROWS(a, b) { GLfloat *_tmp = a; (a)=(b); (b)=_tmp; } |
| | Swaps the values of two floating pointer variables. More...
|
| typedef GLboolean(* | inv_mat_func )(GLmatrix *mat) |
| | Matrix inversion function pointer type. More...
|
| GLboolean | invert_matrix_general (GLmatrix *mat) |
| | Compute inverse of 4x4 transformation matrix. More...
|
| GLboolean | invert_matrix_3d_general (GLmatrix *mat) |
| | Compute inverse of a general 3d transformation matrix. More...
|
| GLboolean | invert_matrix_3d (GLmatrix *mat) |
| | Compute inverse of a 3d transformation matrix. More...
|
| GLboolean | invert_matrix_identity (GLmatrix *mat) |
| | Compute inverse of an identity transformation matrix. More...
|
| GLboolean | invert_matrix_3d_no_rot (GLmatrix *mat) |
| | Compute inverse of a no-rotation 3d transformation matrix. More...
|
| GLboolean | invert_matrix_2d_no_rot (GLmatrix *mat) |
| | Compute inverse of a no-rotation 2d transformation matrix. More...
|
| GLboolean | matrix_invert (GLmatrix *mat) |
| | Compute inverse of a transformation matrix. More...
|
| inv_mat_func | inv_mat_tab [7] |
| | Table of the matrix inversion functions according to the matrix type. More...
|
Matrix analysis |
| #define | ZERO(x) (1<<x) |
| #define | ONE(x) (1<<(x+16)) |
| #define | MASK_NO_TRX (ZERO(12) | ZERO(13) | ZERO(14)) |
| #define | MASK_NO_2D_SCALE ( ONE(0) | ONE(5)) |
| #define | MASK_IDENTITY |
| #define | MASK_2D_NO_ROT |
| #define | MASK_2D |
| #define | MASK_3D_NO_ROT |
| #define | MASK_3D |
| #define | MASK_PERSPECTIVE |
| #define | SQ(x) ((x)*(x)) |
| void | analyse_from_scratch (GLmatrix *mat) |
| | Determine type and flags from scratch. More...
|
| void | analyse_from_flags (GLmatrix *mat) |
| | Analyze a matrix given that its flags are accurate. More...
|
| void | _math_matrix_analyse (GLmatrix *mat) |
| | Analyze and update a matrix. More...
|
Matrix output |
| void | print_matrix_floats (const GLfloat m[16]) |
| | Print a matrix array. More...
|
| void | _math_matrix_print (const GLmatrix *m) |
| | Dumps the contents of a GLmatrix structure. More...
|
Matrix generation |
| void | _math_matrix_rotate (GLmatrix *mat, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) |
| | Generate a 4x4 transformation matrix from glRotate parameters, and post-multiply the input matrix by it. More...
|
| void | _math_matrix_frustum (GLmatrix *mat, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearval, GLfloat farval) |
| | Apply a perspective projection matrix. More...
|
| void | _math_matrix_ortho (GLmatrix *mat, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat nearval, GLfloat farval) |
| | Apply an orthographic projection matrix. More...
|
| void | _math_matrix_scale (GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z) |
| | Multiply a matrix with a general scaling matrix. More...
|
| void | _math_matrix_translate (GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z) |
| | Multiply a matrix with a translation matrix. More...
|
| void | _math_matrix_set_identity (GLmatrix *mat) |
| | Set a matrix to the identity matrix. More...
|
Matrix setup |
| void | _math_matrix_copy (GLmatrix *to, const GLmatrix *from) |
| | Copy a matrix. More...
|
| void | _math_matrix_loadf (GLmatrix *mat, const GLfloat *m) |
| | Loads a matrix array into GLmatrix. More...
|
| void | _math_matrix_ctr (GLmatrix *m) |
| | Matrix constructor. More...
|
| void | _math_matrix_dtr (GLmatrix *m) |
| | Matrix destructor. More...
|
| void | _math_matrix_alloc_inv (GLmatrix *m) |
| | Allocate a matrix inverse. More...
|
Matrix transpose |
| void | _math_transposef (GLfloat to[16], const GLfloat from[16]) |
| | Transpose a GLfloat matrix. More...
|
| void | _math_transposed (GLdouble to[16], const GLdouble from[16]) |
| | Transpose a GLdouble matrix. More...
|
| void | _math_transposefd (GLfloat to[16], const GLdouble from[16]) |
| | Transpose a GLdouble matrix and convert to GLfloat. More...
|
Defines |
| #define | MAT(m, r, c) (m)[(c)*4+(r)] |
| | References an element of 4x4 matrix. More...
|
| #define | M(row, col) m[col*4+row] |
| #define | M(row, col) m[col*4+row] |
| #define | M(row, col) m[col*4+row] |
Variables |
| const char * | types [] |
| | Names of the corresponding GLmatrixtype values. More...
|
| GLfloat | Identity [16] |
| | Identity matrix. More...
|