RetroArch
|
#include <boolean.h>
#include <math.h>
#include <string.h>
#include <retro_common_api.h>
#include <retro_inline.h>
Go to the source code of this file.
Classes | |
struct | math_matrix_3x3 |
Macros | |
#define | MAT_ELEM_3X3(mat, r, c) ((mat).data[3 * (r) + (c)]) |
#define | matrix_3x3_init(mat, n11, n12, n13, n21, n22, n23, n31, n32, n33) |
#define | matrix_3x3_identity(mat) |
#define | matrix_3x3_divide_scalar(mat, s) |
#define | matrix_3x3_transpose(mat, in) |
#define | matrix_3x3_multiply(out, a, b) |
#define | matrix_3x3_determinant(mat) (MAT_ELEM_3X3(mat, 0, 0) * (MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 1)) - MAT_ELEM_3X3(mat, 0, 1) * (MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 0)) + MAT_ELEM_3X3(mat, 0, 2) * (MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 1) - MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 0))) |
#define | matrix_3x3_adjoint(mat) |
#define | FLOATS_ARE_EQUAL(x, y) (fabs(x - y) <= 0.00001f * ((x) > (y) ? (y) : (x))) |
#define | FLOAT_IS_ZERO(x) (FLOATS_ARE_EQUAL((x) + 1, 1)) |
Typedefs | |
typedef RETRO_BEGIN_DECLS struct math_matrix_3x3 | math_matrix_3x3 |
Functions | |
static INLINE bool | matrix_3x3_invert (math_matrix_3x3 *mat) |
static INLINE bool | matrix_3x3_square_to_quad (const float dx0, const float dy0, const float dx1, const float dy1, const float dx3, const float dy3, const float dx2, const float dy2, math_matrix_3x3 *mat) |
static INLINE bool | matrix_3x3_quad_to_square (const float sx0, const float sy0, const float sx1, const float sy1, const float sx2, const float sy2, const float sx3, const float sy3, math_matrix_3x3 *mat) |
static INLINE bool | matrix_3x3_quad_to_quad (const float dx0, const float dy0, const float dx1, const float dy1, const float dx2, const float dy2, const float dx3, const float dy3, const float sx0, const float sy0, const float sx1, const float sy1, const float sx2, const float sy2, const float sx3, const float sy3, math_matrix_3x3 *mat) |
#define FLOAT_IS_ZERO | ( | x | ) | (FLOATS_ARE_EQUAL((x) + 1, 1)) |
#define matrix_3x3_adjoint | ( | mat | ) |
#define matrix_3x3_determinant | ( | mat | ) | (MAT_ELEM_3X3(mat, 0, 0) * (MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 1)) - MAT_ELEM_3X3(mat, 0, 1) * (MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 2) - MAT_ELEM_3X3(mat, 1, 2) * MAT_ELEM_3X3(mat, 2, 0)) + MAT_ELEM_3X3(mat, 0, 2) * (MAT_ELEM_3X3(mat, 1, 0) * MAT_ELEM_3X3(mat, 2, 1) - MAT_ELEM_3X3(mat, 1, 1) * MAT_ELEM_3X3(mat, 2, 0))) |
#define matrix_3x3_divide_scalar | ( | mat, | |
s | |||
) |
#define matrix_3x3_identity | ( | mat | ) |
#define matrix_3x3_init | ( | mat, | |
n11, | |||
n12, | |||
n13, | |||
n21, | |||
n22, | |||
n23, | |||
n31, | |||
n32, | |||
n33 | |||
) |
#define matrix_3x3_transpose | ( | mat, | |
in | |||
) |
typedef RETRO_BEGIN_DECLS struct math_matrix_3x3 math_matrix_3x3 |
|
static |
|
static |
|
static |