Matrix routines.
Definition in file rs_matrix.rsh.
| float rsMatrixGet | ( | const rs_matrix4x4 * | m, |
| uint32_t | row, | ||
| uint32_t | col | ||
| ) |
Get one element of a matrix.
| m | The matrix to read from |
| row | |
| col |
| float rsMatrixGet | ( | const rs_matrix3x3 * | m, |
| uint32_t | row, | ||
| uint32_t | col | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| float rsMatrixGet | ( | const rs_matrix2x2 * | m, |
| uint32_t | row, | ||
| uint32_t | col | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| bool rsMatrixInverse | ( | rs_matrix4x4 * | m | ) |
Returns true if the matrix was successfully inversed
| m |
| bool rsMatrixInverseTranspose | ( | rs_matrix4x4 * | m | ) |
Returns true if the matrix was successfully inversed and transposed.
| m |
| void rsMatrixLoad | ( | rs_matrix4x4 * | m, |
| const float * | v | ||
| ) |
Set the elements of a matrix from an array of floats.
| m |
| void rsMatrixLoad | ( | rs_matrix3x3 * | m, |
| const float * | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoad | ( | rs_matrix2x2 * | m, |
| const float * | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoad | ( | rs_matrix4x4 * | m, |
| const rs_matrix4x4 * | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoad | ( | rs_matrix4x4 * | m, |
| const rs_matrix3x3 * | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoad | ( | rs_matrix4x4 * | m, |
| const rs_matrix2x2 * | v | ||
| ) |
Set the elements of a matrix from another matrix.
| m |
| void rsMatrixLoad | ( | rs_matrix3x3 * | m, |
| const rs_matrix3x3 * | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoad | ( | rs_matrix2x2 * | m, |
| const rs_matrix2x2 * | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoadFrustum | ( | rs_matrix4x4 * | m, |
| float | left, | ||
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | near, | ||
| float | far | ||
| ) |
Load an Frustum projection matrix constructed from the 6 planes
| m | |
| left | |
| right | |
| bottom | |
| top | |
| near | |
| far |
| void rsMatrixLoadIdentity | ( | rs_matrix4x4 * | m | ) |
Set the elements of a matrix to the identity matrix.
| m |
| void rsMatrixLoadIdentity | ( | rs_matrix3x3 * | m | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoadIdentity | ( | rs_matrix2x2 * | m | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoadMultiply | ( | rs_matrix4x4 * | m, |
| const rs_matrix4x4 * | lhs, | ||
| const rs_matrix4x4 * | rhs | ||
| ) |
Multiply two matrix (lhs, rhs) and place the result in m.
| m | |
| lhs | |
| rhs |
| void rsMatrixLoadMultiply | ( | rs_matrix3x3 * | m, |
| const rs_matrix3x3 * | lhs, | ||
| const rs_matrix3x3 * | rhs | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoadMultiply | ( | rs_matrix2x2 * | m, |
| const rs_matrix2x2 * | lhs, | ||
| const rs_matrix2x2 * | rhs | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixLoadOrtho | ( | rs_matrix4x4 * | m, |
| float | left, | ||
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | near, | ||
| float | far | ||
| ) |
Load an Ortho projection matrix constructed from the 6 planes
| m | |
| left | |
| right | |
| bottom | |
| top | |
| near | |
| far |
| void rsMatrixLoadPerspective | ( | rs_matrix4x4 * | m, |
| float | fovy, | ||
| float | aspect, | ||
| float | near, | ||
| float | far | ||
| ) |
Load an perspective projection matrix constructed from the 6 planes
| m | |
| fovy | Field of view, in degrees along the Y axis. |
| aspect | Ratio of x / y. |
| near | |
| far |
| void rsMatrixLoadRotate | ( | rs_matrix4x4 * | m, |
| float | rot, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Load a rotation matrix.
| m | |
| rot | |
| x | |
| y | |
| z |
| void rsMatrixLoadScale | ( | rs_matrix4x4 * | m, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Load a scale matrix.
| m | |
| x | |
| y | |
| z |
| void rsMatrixLoadTranslate | ( | rs_matrix4x4 * | m, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Load a translation matrix.
| m | |
| x | |
| y | |
| z |
| void rsMatrixMultiply | ( | rs_matrix4x4 * | m, |
| const rs_matrix4x4 * | rhs | ||
| ) |
Multiply the matrix m by rhs and place the result back into m.
| m | (lhs) |
| rhs |
| void rsMatrixMultiply | ( | rs_matrix3x3 * | m, |
| const rs_matrix3x3 * | rhs | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixMultiply | ( | rs_matrix2x2 * | m, |
| const rs_matrix2x2 * | rhs | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| float4 rsMatrixMultiply | ( | const rs_matrix4x4 * | m, |
| float4 | in | ||
| ) |
Multiply a vector by a matrix and return the result vector. API version 14+
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| float3 rsMatrixMultiply | ( | const rs_matrix3x3 * | m, |
| float3 | in | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| float2 rsMatrixMultiply | ( | const rs_matrix2x2 * | m, |
| float2 | in | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixRotate | ( | rs_matrix4x4 * | m, |
| float | rot, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Multiple matrix m with a rotation matrix
| m | |
| rot | |
| x | |
| y | |
| z |
| void rsMatrixScale | ( | rs_matrix4x4 * | m, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Multiple matrix m with a scale matrix
| m | |
| x | |
| y | |
| z |
| void rsMatrixSet | ( | rs_matrix4x4 * | m, |
| uint32_t | row, | ||
| uint32_t | col, | ||
| float | v | ||
| ) |
Set one element of a matrix.
| m | The matrix to be set |
| row | |
| col | |
| v |
| void rsMatrixSet | ( | rs_matrix3x3 * | m, |
| uint32_t | row, | ||
| uint32_t | col, | ||
| float | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixSet | ( | rs_matrix2x2 * | m, |
| uint32_t | row, | ||
| uint32_t | col, | ||
| float | v | ||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixTranslate | ( | rs_matrix4x4 * | m, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Multiple matrix m with a translation matrix
| m | |
| x | |
| y | |
| z |
| void rsMatrixTranspose | ( | rs_matrix4x4 * | m | ) |
Transpose the matrix m.
| m |
| void rsMatrixTranspose | ( | rs_matrix3x3 * | m | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void rsMatrixTranspose | ( | rs_matrix2x2 * | m | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.