Matrix definition and operations. More...
| Data Structures | |
| struct | _Eina_Matrix3 | 
| Floating point matrix3 handler.  More... | |
| 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 struct _Eina_Matrix3 | Eina_Matrix3 | 
| Floating point matrix3 handler. | |
| Functions | |
| EAPI Eina_Matrix_Type | eina_matrix3_type_get (const Eina_Matrix3 *m) | 
| Returns the type of the given floating point matrix.  More... | |
| EAPI 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... | |
| EAPI 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... | |
| EAPI 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... | |
| EAPI 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... | |
| EAPI Eina_Bool | eina_matrix3_equal (const Eina_Matrix3 *m1, const Eina_Matrix3 *m2) | 
| Checks whether the two given matrices are equal or not.  More... | |
| EAPI void | eina_matrix3_compose (const Eina_Matrix3 *m1, const Eina_Matrix3 *m2, Eina_Matrix3 *dst) | 
| EAPI void | eina_matrix3_translate (Eina_Matrix3 *t, double tx, double ty) | 
| Sets the matrix values for a translation.  More... | |
| EAPI void | eina_matrix3_scale (Eina_Matrix3 *t, double sx, double sy) | 
| Sets the matrix values for a scale.  More... | |
| EAPI void | eina_matrix3_rotate (Eina_Matrix3 *t, double rad) | 
| Sets the matrix values for a rotation.  More... | |
| EAPI void | eina_matrix3_identity (Eina_Matrix3 *t) | 
| Sets the given floating point matrix to the identity matrix.  More... | |
| EAPI double | eina_matrix3_determinant (const Eina_Matrix3 *m) | 
| Returns the determinant of the given matrix.  More... | |
| EAPI void | eina_matrix3_divide (Eina_Matrix3 *m, double scalar) | 
| Divides the given matrix by the given scalar.  More... | |
| EAPI void | eina_matrix3_inverse (const Eina_Matrix3 *m, Eina_Matrix3 *m2) | 
| Computes the inverse of the given matrix.  More... | |
| EAPI void | eina_matrix3_transpose (const Eina_Matrix3 *m, Eina_Matrix3 *a) | 
| EAPI void | eina_matrix3_cofactor (const Eina_Matrix3 *m, Eina_Matrix3 *a) | 
| EAPI void | eina_matrix3_adjoint (const Eina_Matrix3 *m, Eina_Matrix3 *a) | 
| EAPI void | eina_matrix3_point_transform (const Eina_Matrix3 *m, double x, double y, double *xr, double *yr) | 
| EAPI void | eina_matrix3_rectangle_transform (const Eina_Matrix3 *m, const Eina_Rectangle *r, const Eina_Quad *q) | 
| EAPI 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. | |
| EAPI Eina_Bool | eina_matrix3_square_quad_map (Eina_Matrix3 *m, const Eina_Quad *q) | 
| EAPI Eina_Bool | eina_matrix3_quad_square_map (Eina_Matrix3 *m, const Eina_Quad *q) | 
| EAPI void | eina_matrix3_array_set (Eina_Matrix3 *m, const double *v) | 
| Sets array to matrix.  More... | |
| EAPI void | eina_matrix3_copy (Eina_Matrix3 *dst, const Eina_Matrix3 *src) | 
| Copies matrix.  More... | |
| EAPI void | eina_matrix3_multiply (Eina_Matrix3 *out, const Eina_Matrix3 *mat_a, const Eina_Matrix3 *mat_b) | 
| Multiplies two matrix.  More... | |
| EAPI void | eina_matrix3_multiply_copy (Eina_Matrix3 *out, const Eina_Matrix3 *mat_a, const Eina_Matrix3 *mat_b) | 
| Multiplies two matrix.  More... | |
| EAPI void | eina_matrix3_scale_transform_set (Eina_Matrix3 *out, double s_x, double s_y) | 
| Transforms scale of matrix.  More... | |
| EAPI void | eina_matrix3_position_transform_set (Eina_Matrix3 *out, const double p_x, const double p_y) | 
| Transforms position of matrix.  More... | |
| EAPI void | eina_normal3_matrix_get (Eina_Matrix3 *out, const Eina_Matrix4 *m) | 
| Sets normal of the given matrix.  More... | |
| EAPI void | eina_matrix3_matrix4_to (Eina_Matrix4 *m4, const Eina_Matrix3 *m3) | 
| Converts an Eina_Matrix3 into an Eina_Matrix4.  More... | |
Matrix definition and operations.
| #define EINA_MATRIX3_ARGS | ( | m | ) | 
Helper macro for printf formatting arg.
| EAPI Eina_Matrix_Type eina_matrix3_type_get | ( | const Eina_Matrix3 * | m | ) | 
Returns the type of the given floating point matrix.
| m | The floating point matrix. | 
This function returns the type of the matrix m. No check is done on m.
References EINA_DBL_EQ, EINA_MATRIX_TYPE_AFFINE, EINA_MATRIX_TYPE_IDENTITY, and EINA_MATRIX_TYPE_PROJECTIVE.
Referenced by eina_matrix3_multiply().
| EAPI 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.
| m | The floating point matrix. | 
| xx | The first coefficient value. | 
| xy | The second coefficient value. | 
| xz | The third coefficient value. | 
| yx | The fourth coefficient value. | 
| yy | The fifth coefficient value. | 
| yz | The sixth coefficient value. | 
| zx | The seventh coefficient value. | 
| zy | The heighth coefficient value. | 
| zz | The nineth coefficient value. | 
This function sets the values of the coefficients of the matrix m. No check is done on m.
| EAPI 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.
| m | The floating point matrix. | 
| xx | The first coefficient value. | 
| xy | The second coefficient value. | 
| xz | The third coefficient value. | 
| yx | The fourth coefficient value. | 
| yy | The fifth coefficient value. | 
| yz | The sixth coefficient value. | 
| zx | The seventh coefficient value. | 
| zy | The heighth coefficient value. | 
| zz | The nineth coefficient value. | 
This function gets the values of the coefficients of the matrix m. No check is done on m.
| EAPI 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.
| m | The fixed point matrix. | 
| xx | The first coefficient value. | 
| xy | The second coefficient value. | 
| xz | The third coefficient value. | 
| yx | The fourth coefficient value. | 
| yy | The fifth coefficient value. | 
| yz | The sixth coefficient value. | 
| zx | The seventh coefficient value. | 
| zy | The heighth coefficient value. | 
| zz | The nineth coefficient value. | 
This function gets the values of the coefficients of the matrix m. No check is done on m.
References eina_f16p16_double_from().
Referenced by eina_matrix3_matrix3_f16p16_to().
| EAPI 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.
| m | The floating point matrix. | 
| fm | The fixed point matrix. | 
This function transforms the floating point matrix m to a fixed point matrix and store the coefficients into the fixed point matrix fm.
References eina_matrix3_fixed_values_get().
| EAPI Eina_Bool eina_matrix3_equal | ( | const Eina_Matrix3 * | m1, | 
| const Eina_Matrix3 * | m2 | ||
| ) | 
Checks whether the two given matrices are equal or not.
| m1 | The first matrix. | 
| m2 | The second matrix. | 
0 otherwise.This function return EINA_TRUE if thematrices m1 and m2 are equal, EINA_FALSE otherwise. No check is done on the matrices.
References EINA_DBL_EQ, EINA_FALSE, EINA_TRUE, _Eina_Matrix3::xx, _Eina_Matrix3::xy, _Eina_Matrix3::xz, _Eina_Matrix3::yx, _Eina_Matrix3::yy, _Eina_Matrix3::yz, _Eina_Matrix3::zx, _Eina_Matrix3::zy, and _Eina_Matrix3::zz.
| EAPI void eina_matrix3_compose | ( | const Eina_Matrix3 * | m1, | 
| const Eina_Matrix3 * | m2, | ||
| Eina_Matrix3 * | dst | ||
| ) | 
Referenced by eina_matrix3_quad_quad_map(), eina_matrix3_rotate(), eina_matrix3_scale(), and eina_matrix3_translate().
| EAPI void eina_matrix3_translate | ( | Eina_Matrix3 * | t, | 
| double | tx, | ||
| double | ty | ||
| ) | 
Sets the matrix values for a translation.
| [in] | m | The matrix to set the translation values | 
| [in] | tx | The X coordinate translate | 
| [in] | ty | The Y coordinate translate | 
References eina_matrix3_compose().
| EAPI void eina_matrix3_scale | ( | Eina_Matrix3 * | t, | 
| double | sx, | ||
| double | sy | ||
| ) | 
Sets the matrix values for a scale.
| [in] | m | The matrix to set the scale values | 
| [in] | sx | The X coordinate scale | 
| [in] | sy | The Y coordinate scale | 
References eina_matrix3_compose().
| EAPI void eina_matrix3_rotate | ( | Eina_Matrix3 * | t, | 
| double | rad | ||
| ) | 
Sets the matrix values for a rotation.
| [in] | t | The matrix to set the rotation values | 
| [in] | rad | The radius to rotate the matrix | 
References eina_matrix3_compose().
| EAPI void eina_matrix3_identity | ( | Eina_Matrix3 * | t | ) | 
Sets the given floating point matrix to the identity matrix.
| m | The floating point matrix to set | 
This function sets m to the identity matrix. No check is done on m.
Referenced by eina_matrix3_inverse(), eina_matrix3_position_transform_set(), and eina_matrix3_scale_transform_set().
| EAPI double eina_matrix3_determinant | ( | const Eina_Matrix3 * | m | ) | 
Returns the determinant of the given matrix.
| m | The matrix. | 
This function returns the determinant of the matrix m. No check is done on m.
Referenced by eina_matrix3_inverse().
| EAPI void eina_matrix3_divide | ( | Eina_Matrix3 * | m, | 
| double | scalar | ||
| ) | 
Divides the given matrix by the given scalar.
| m | The matrix. | 
| scalar | The scalar number. | 
This function divides the matrix m by scalar. No check is done on m.
Referenced by eina_matrix3_inverse(), and eina_matrix3_quad_square_map().
| EAPI void eina_matrix3_inverse | ( | const Eina_Matrix3 * | m, | 
| Eina_Matrix3 * | m2 | ||
| ) | 
Computes the inverse of the given matrix.
| m | The matrix to inverse. | 
| m2 | The inverse matrix. | 
This function inverse the matrix m and stores the result in m2. No check is done on m or m2. If m can not be invertible, then m2 is set to the identity matrix.
References EINA_DBL_EQ, eina_matrix3_adjoint(), eina_matrix3_determinant(), eina_matrix3_divide(), and eina_matrix3_identity().
Referenced by eina_matrix3_quad_square_map().
| EAPI void eina_matrix3_transpose | ( | const Eina_Matrix3 * | m, | 
| Eina_Matrix3 * | a | ||
| ) | 
Referenced by eina_matrix3_adjoint().
| EAPI void eina_matrix3_cofactor | ( | const Eina_Matrix3 * | m, | 
| Eina_Matrix3 * | a | ||
| ) | 
Referenced by eina_matrix3_adjoint().
| EAPI void eina_matrix3_adjoint | ( | const Eina_Matrix3 * | m, | 
| Eina_Matrix3 * | a | ||
| ) | 
References eina_matrix3_cofactor(), and eina_matrix3_transpose().
Referenced by eina_matrix3_inverse().
| EAPI void eina_matrix3_point_transform | ( | const Eina_Matrix3 * | m, | 
| double | x, | ||
| double | y, | ||
| double * | xr, | ||
| double * | yr | ||
| ) | 
| EAPI void eina_matrix3_rectangle_transform | ( | const Eina_Matrix3 * | m, | 
| const Eina_Rectangle * | r, | ||
| const Eina_Quad * | q | ||
| ) | 
References eina_matrix3_point_transform(), _Eina_Rectangle::h, _Eina_Rectangle::w, _Eina_Rectangle::x, and _Eina_Rectangle::y.
| EAPI Eina_Bool eina_matrix3_square_quad_map | ( | Eina_Matrix3 * | m, | 
| const Eina_Quad * | q | ||
| ) | 
References EINA_DBL_EQ, EINA_FALSE, and EINA_TRUE.
Referenced by eina_matrix3_quad_quad_map(), and eina_matrix3_quad_square_map().
| EAPI Eina_Bool eina_matrix3_quad_square_map | ( | Eina_Matrix3 * | m, | 
| const Eina_Quad * | q | ||
| ) | 
References EINA_DBL_EQ, EINA_FALSE, eina_matrix3_divide(), eina_matrix3_inverse(), eina_matrix3_square_quad_map(), and EINA_TRUE.
Referenced by eina_matrix3_quad_quad_map().
| EAPI void eina_matrix3_array_set | ( | Eina_Matrix3 * | m, | 
| const double * | v | ||
| ) | 
Sets array to matrix.
| m | The result matrix | 
| v | The the array[9] for set | 
Set to matrix first 9 elements from array
| EAPI void eina_matrix3_copy | ( | Eina_Matrix3 * | dst, | 
| const Eina_Matrix3 * | src | ||
| ) | 
Copies matrix.
| dst | The matrix copy | 
| src | The matrix for copy. | 
Referenced by eina_matrix3_multiply(), and eina_matrix3_multiply_copy().
| EAPI void eina_matrix3_multiply | ( | Eina_Matrix3 * | out, | 
| const Eina_Matrix3 * | mat_a, | ||
| const Eina_Matrix3 * | mat_b | ||
| ) | 
Multiplies two matrix.
| out | The resulting matrix | 
| mat_a | The first member of the multiplication | 
| mat_b | The second member of the multiplication | 
References eina_matrix3_copy(), eina_matrix3_type_get(), and EINA_MATRIX_TYPE_IDENTITY.
Referenced by eina_matrix3_multiply_copy().
| EAPI void eina_matrix3_multiply_copy | ( | Eina_Matrix3 * | out, | 
| const Eina_Matrix3 * | mat_a, | ||
| const Eina_Matrix3 * | mat_b | ||
| ) | 
Multiplies two matrix.
| out | The resulting matrix | 
| mat_a | The first member of the multiplication | 
| mat_b | The second member of the multiplication | 
References eina_matrix3_copy(), and eina_matrix3_multiply().
| EAPI void eina_matrix3_scale_transform_set | ( | Eina_Matrix3 * | out, | 
| double | s_x, | ||
| double | s_y | ||
| ) | 
Transforms scale of matrix.
| out | The resulting matrix | 
| s_x | The scale value for x | 
| s_y | The scale value for y | 
References eina_matrix3_identity().
| EAPI void eina_matrix3_position_transform_set | ( | Eina_Matrix3 * | out, | 
| const double | p_x, | ||
| const double | p_y | ||
| ) | 
Transforms position of matrix.
| out | The resulting matrix | 
| p_x | The position value for x | 
| p_y | The position value for y | 
References eina_matrix3_identity().
| EAPI void eina_normal3_matrix_get | ( | Eina_Matrix3 * | out, | 
| const Eina_Matrix4 * | m | ||
| ) | 
Sets normal of the given matrix.
| out | The result mtrix of normal | 
| m | The matrix | 
| EAPI void eina_matrix3_matrix4_to | ( | Eina_Matrix4 * | m4, | 
| const Eina_Matrix3 * | m3 | ||
| ) | 
Converts an Eina_Matrix3 into an Eina_Matrix4.
| m3 | The destination Eina_Matrix3. | 
| m4 | The source Eina_Matrix4. |