Data Structures | |
struct | _Eina_Matrix3 |
A 3x3 floating point matrix. More... | |
struct | _Eina_Matrix4 |
struct | _Eina_Matrix3_F16p16 |
struct | _Eina_Matrix2 |
Macros | |
#define | EINA_MATRIX3_FORMAT "g %g %g | %g %g %g | %g %g %g" |
Helper macro for printf formatting. | |
#define | EINA_MATRIX3_ARGS(m) |
Helper macro for printf formatting arg. More... | |
Typedefs | |
typedef enum _Eina_Matrix_Type | Eina_Matrix_Type |
Matrix types. | |
typedef enum _Eina_Matrix_Axis | Eina_Matrix_Axis |
Matrix Axes. | |
typedef struct _Eina_Matrix3 | Eina_Matrix3 |
A 3x3 floating point matrix. | |
typedef struct _Eina_Matrix4 | Eina_Matrix4 |
A 4x4 floating point matrix. | |
typedef struct _Eina_Matrix3_F16p16 | Eina_Matrix3_F16p16 |
A 3x3 fixed point (Q16.16) matrix. | |
typedef struct _Eina_Matrix2 | Eina_Matrix2 |
A 2x2 floating point matrix. | |
Enumerations | |
enum | _Eina_Matrix_Type { EINA_MATRIX_TYPE_IDENTITY , EINA_MATRIX_TYPE_AFFINE , EINA_MATRIX_TYPE_PROJECTIVE , EINA_MATRIX_TYPE_LAST } |
enum | _Eina_Matrix_Axis { EINA_MATRIX_AXIS_X , EINA_MATRIX_AXIS_Y , EINA_MATRIX_AXIS_Z } |
Functions | |
EINA_API void | eina_matrix3_f16p16_identity (Eina_Matrix3_F16p16 *m) |
Sets the given fixed point matrix to the identity matrix. More... | |
EINA_API void | eina_matrix3_f16p16_compose (const Eina_Matrix3_F16p16 *m1, const Eina_Matrix3_F16p16 *m2, Eina_Matrix3_F16p16 *dst) |
Sets dst as the matrix multiplication (composition) of two Eina_F16p16 matrices. More... | |
EINA_API Eina_Matrix_Type | eina_matrix3_f16p16_type_get (const Eina_Matrix3_F16p16 *m) |
Returns the type of the given fixed point matrix. More... | |
EINA_API Eina_Matrix_Type | eina_matrix3_type_get (const Eina_Matrix3 *m) |
Returns the type of the given floating point matrix. More... | |
EINA_API void | eina_matrix3_values_set (Eina_Matrix3 *m, double xx, double xy, double xz, double yx, double yy, double yz, double zx, double zy, double zz) |
Sets the values of the coefficients of the given floating point matrix. More... | |
EINA_API void | eina_matrix3_values_get (const Eina_Matrix3 *m, double *xx, double *xy, double *xz, double *yx, double *yy, double *yz, double *zx, double *zy, double *zz) |
Gets the values of the coefficients of the given floating point matrix. More... | |
EINA_API void | eina_matrix3_fixed_values_get (const Eina_Matrix3 *m, Eina_F16p16 *xx, Eina_F16p16 *xy, Eina_F16p16 *xz, Eina_F16p16 *yx, Eina_F16p16 *yy, Eina_F16p16 *yz, Eina_F16p16 *zx, Eina_F16p16 *zy, Eina_F16p16 *zz) |
Gets the values of the coefficients of the given fixed point matrix. More... | |
EINA_API void | eina_matrix3_matrix3_f16p16_to (const Eina_Matrix3 *m, Eina_Matrix3_F16p16 *fm) |
Transforms the given floating point matrix to the given fixed point matrix. More... | |
EINA_API Eina_Bool | eina_matrix3_equal (const Eina_Matrix3 *m1, const Eina_Matrix3 *m2) |
Checks whether the two matrices are equivalent. More... | |
EINA_API void | eina_matrix3_compose (const Eina_Matrix3 *m1, const Eina_Matrix3 *m2, Eina_Matrix3 *dst) |
Sets dst as the matrix multiplication (composition) of two matrices. More... | |
EINA_API void | eina_matrix3_translate (Eina_Matrix3 *m, double tx, double ty) |
Sets the matrix values for a translation operation. More... | |
EINA_API void | eina_matrix3_scale (Eina_Matrix3 *m, double sx, double sy) |
Sets the matrix values for a scaling operation. More... | |
EINA_API void | eina_matrix3_rotate (Eina_Matrix3 *m, double rad) |
Sets the matrix values for a rotation operation. More... | |
EINA_API void | eina_matrix3_identity (Eina_Matrix3 *m) |
Sets the given floating point matrix to the identity matrix. More... | |
EINA_API double | eina_matrix3_determinant (const Eina_Matrix3 *m) |
Calculates the determinant of the given matrix. More... | |
EINA_API void | eina_matrix3_divide (Eina_Matrix3 *m, double scalar) |
Divides the given matrix by a scalar number. More... | |
EINA_API void | eina_matrix3_inverse (const Eina_Matrix3 *m, Eina_Matrix3 *m2) |
Computes the inverse of the given matrix. More... | |
EINA_API void | eina_matrix3_transpose (const Eina_Matrix3 *m, Eina_Matrix3 *a) |
Computes the transpose of the given matrix. More... | |
EINA_API void | eina_matrix3_cofactor (const Eina_Matrix3 *m, Eina_Matrix3 *a) |
Computes the cofactor of the given matrix. More... | |
EINA_API void | eina_matrix3_adjoint (const Eina_Matrix3 *m, Eina_Matrix3 *a) |
Computes the adjoint of the given matrix. More... | |
EINA_API void | eina_matrix3_point_transform (const Eina_Matrix3 *m, double x, double y, double *xr, double *yr) |
Computes the transform of a 2D point using the given matrix. More... | |
EINA_API void | eina_matrix3_rectangle_transform (const Eina_Matrix3 *m, const Eina_Rectangle *r, const Eina_Quad *q) |
Computes the transformation of a rectangle using the given matrix. More... | |
EINA_API Eina_Bool | eina_matrix3_quad_quad_map (Eina_Matrix3 *m, const Eina_Quad *src, const Eina_Quad *dst) |
Creates a projective matrix that maps a quadrangle to a quadrangle. More... | |
EINA_API Eina_Bool | eina_matrix3_square_quad_map (Eina_Matrix3 *m, const Eina_Quad *q) |
Creates a matrix for unit-square to quad mapping. More... | |
EINA_API Eina_Bool | eina_matrix3_quad_square_map (Eina_Matrix3 *m, const Eina_Quad *q) |
Creates a matrix for mapping squares to match quad. More... | |
EINA_API void | eina_matrix3_array_set (Eina_Matrix3 *m, const double *v) |
Sets matrix values using an array. More... | |
EINA_API void | eina_matrix3_copy (Eina_Matrix3 *dst, const Eina_Matrix3 *src) |
Copies a matrix. More... | |
EINA_API void | eina_matrix3_multiply (Eina_Matrix3 *out, const Eina_Matrix3 *mat_a, const Eina_Matrix3 *mat_b) |
Multiplies two matrices. More... | |
EINA_API void | eina_matrix3_multiply_copy (Eina_Matrix3 *out, const Eina_Matrix3 *mat_a, const Eina_Matrix3 *mat_b) |
Multiplies two matrices without overwriting them. More... | |
EINA_API void | eina_matrix3_scale_transform_set (Eina_Matrix3 *out, double s_x, double s_y) |
Sets the scale parameters (XX, YY) of a matrix. More... | |
EINA_API void | eina_matrix3_position_transform_set (Eina_Matrix3 *out, const double p_x, const double p_y) |
Sets the positional parameters (XZ, YZ) of a matrix. More... | |
EINA_API void | eina_normal3_matrix_get (Eina_Matrix3 *out, const Eina_Matrix4 *m) |
Sets normal of the given matrix. More... | |
EINA_API void | eina_matrix3_matrix4_to (Eina_Matrix4 *m4, const Eina_Matrix3 *m3) |
Converts an Eina_Matrix3 into an Eina_Matrix4. More... | |
EINA_API Eina_Matrix_Type | eina_matrix4_type_get (const Eina_Matrix4 *m) |
Returns the type of the given floating point matrix. More... | |
EINA_API void | eina_matrix4_values_set (Eina_Matrix4 *m, double xx, double xy, double xz, double xw, double yx, double yy, double yz, double yw, double zx, double zy, double zz, double zw, double wx, double wy, double wz, double ww) |
Sets the values of the coefficients of the given floating point matrix. More... | |
EINA_API void | eina_matrix4_values_get (const Eina_Matrix4 *m, double *xx, double *xy, double *xz, double *xw, double *yx, double *yy, double *yz, double *yw, double *zx, double *zy, double *zz, double *zw, double *wx, double *wy, double *wz, double *ww) |
Gets the values of the coefficients of the given floating point matrix. More... | |
EINA_API double | eina_matrix4_determinant (const Eina_Matrix4 *m) |
Calculates the determinant of the given matrix. More... | |
EINA_API Eina_Bool | eina_matrix4_normalized (Eina_Matrix4 *out, const Eina_Matrix4 *in) |
Normalizes the given matrix. More... | |
EINA_API Eina_Bool | eina_matrix4_inverse (Eina_Matrix4 *out, const Eina_Matrix4 *in) |
Computes the inverse of the given matrix. More... | |
EINA_API void | eina_matrix4_transpose (Eina_Matrix4 *out, const Eina_Matrix4 *in) |
Computes the transpose of the given matrix. More... | |
EINA_API void | eina_matrix4_matrix3_to (Eina_Matrix3 *m3, const Eina_Matrix4 *m4) |
Converts an Eina_Matrix4 into an Eina_Matrix3. More... | |
EINA_API void | eina_matrix4_identity (Eina_Matrix4 *out) |
Sets the given matrix to identity. More... | |
EINA_API void | eina_matrix4_multiply_copy (Eina_Matrix4 *out, const Eina_Matrix4 *mat_a, const Eina_Matrix4 *mat_b) |
Multiplies two matrix. More... | |
EINA_API void | eina_matrix4_array_set (Eina_Matrix4 *m, const double *v) |
Sets matrix values using an array. More... | |
EINA_API void | eina_matrix4_copy (Eina_Matrix4 *dst, const Eina_Matrix4 *src) |
Copies matrix. More... | |
EINA_API void | eina_matrix4_multiply (Eina_Matrix4 *out, const Eina_Matrix4 *mat_a, const Eina_Matrix4 *mat_b) |
Multiplies two matrices with check. More... | |
EINA_API void | eina_matrix4_ortho_set (Eina_Matrix4 *m, double left, double right, double bottom, double top, double dnear, double dfar) |
Sets orthogonality matrix. More... | |
EINA_API void | eina_matrix4_compose (const Eina_Matrix4 *mat_a, const Eina_Matrix4 *mat_b, Eina_Matrix4 *out) |
Sets out as the matrix multiplication (composition) of two matrices. More... | |
EINA_API void | eina_matrix4_translate (Eina_Matrix4 *t, double tx, double ty, double tz) |
Sets the matrix values for a translation operation. More... | |
EINA_API void | eina_matrix4_scale (Eina_Matrix4 *t, double sx, double sy, double sz) |
Sets the matrix values for a scaling operation. More... | |
EINA_API void | eina_matrix4_rotate (Eina_Matrix4 *t, double rad, Eina_Matrix_Axis axis) |
Sets the matrix values for a rotation operation. More... | |
EINA_API void | eina_matrix2_values_set (Eina_Matrix2 *m, double xx, double xy, double yx, double yy) |
Sets the values of the coefficients of the given floating point matrix. More... | |
EINA_API void | eina_matrix2_values_get (const Eina_Matrix2 *m, double *xx, double *xy, double *yx, double *yy) |
Gets the values of the coefficients of the given floating point matrix. More... | |
EINA_API void | eina_matrix2_inverse (Eina_Matrix2 *out, const Eina_Matrix2 *mat) |
Computes the inverse with check of the given matrix. More... | |
EINA_API void | eina_matrix2_identity (Eina_Matrix2 *m) |
Sets the given floating point matrix to the identity matrix. More... | |
EINA_API void | eina_matrix2_array_set (Eina_Matrix2 *m, const double *v) |
Sets array to matrix. More... | |
EINA_API void | eina_matrix2_copy (Eina_Matrix2 *dst, const Eina_Matrix2 *src) |
Copies matrix. More... | |
EINA_API void | eina_matrix2_multiply (Eina_Matrix2 *out, const Eina_Matrix2 *mat_a, const Eina_Matrix2 *mat_b) |
Multiplies two matrices. More... | |
EINA_API void | eina_matrix2_multiply_copy (Eina_Matrix2 *out, const Eina_Matrix2 *mat_a, const Eina_Matrix2 *mat_b) |
Multiplies two matrices with check. More... | |
EINA_API Eina_Matrix_Type | eina_matrix2_type_get (const Eina_Matrix2 *m) |
Returns the type of the given floating point matrix. More... | |