Data Structures | Macros | Typedefs | Enumerations | Functions
eina_matrix.h File Reference

{Eina_Matrix_Type} {Eina_Matrix3_F16p16} {Eina_Matrix3} More...

Data Structures

struct  _Eina_Matrix3_F16p16
 
struct  _Eina_Matrix3
 
struct  _Eina_Matrix4
 

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
 
typedef struct _Eina_Matrix3_F16p16 Eina_Matrix3_F16p16
 Fixed point matrix3 handler.
 
typedef struct _Eina_Matrix3 Eina_Matrix3
 Floating point matrix3 handler.
 
typedef struct _Eina_Matrix4 Eina_Matrix4
 

Enumerations

enum  _Eina_Matrix_Type {
  EINA_MATRIX_TYPE_IDENTITY,
  EINA_MATRIX_TYPE_AFFINE,
  EINA_MATRIX_TYPE_PROJECTIVE,
  EINA_MATRIX_TYPE_LAST
}
 

Functions

EAPI void eina_matrix3_f16p16_identity (Eina_Matrix3_F16p16 *m)
 Set the given fixed point matrix to the identity matrix. More...
 
EAPI void eina_matrix3_f16p16_compose (const Eina_Matrix3_F16p16 *m1, const Eina_Matrix3_F16p16 *m2, Eina_Matrix3_F16p16 *dst)
 
EAPI Eina_Matrix_Type eina_matrix3_f16p16_type_get (const Eina_Matrix3_F16p16 *m)
 Return the type of the given fixed point matrix. More...
 
EAPI Eina_Matrix_Type eina_matrix3_type_get (const Eina_Matrix3 *m)
 Return 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)
 Set 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)
 Get 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)
 Get 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)
 Transform 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)
 Check 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)
 Set the matrix values for a translation. More...
 
EAPI void eina_matrix3_scale (Eina_Matrix3 *t, double sx, double sy)
 Set the matrix values for a scale. More...
 
EAPI void eina_matrix3_rotate (Eina_Matrix3 *t, double rad)
 Set the matrix values for a rotation. More...
 
EAPI void eina_matrix3_identity (Eina_Matrix3 *t)
 Set the given floating point matrix to the identity matrix. More...
 
EAPI double eina_matrix3_determinant (const Eina_Matrix3 *m)
 Return the determinant of the given matrix. More...
 
EAPI void eina_matrix3_divide (Eina_Matrix3 *m, double scalar)
 Divide the given matrix by the given scalar. More...
 
EAPI void eina_matrix3_inverse (const Eina_Matrix3 *m, Eina_Matrix3 *m2)
 Compute 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 Eina_Matrix_Type eina_matrix4_type_get (const Eina_Matrix4 *m)
 Return the type of the given floating point matrix. More...
 
EAPI 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)
 Set the values of the coefficients of the given floating point matrix. More...
 
EAPI 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)
 Get the values of the coefficients of the given floating point matrix. More...
 
EAPI double eina_matrix4_determinant (const Eina_Matrix4 *m)
 Return the determinant of the given matrix. More...
 
EAPI Eina_Bool eina_matrix4_normalized (Eina_Matrix4 *out, const Eina_Matrix4 *in)
 Return the determinant of the given matrix. More...
 
EAPI Eina_Bool eina_matrix4_inverse (Eina_Matrix4 *out, const Eina_Matrix4 *in)
 Return the inverse of the given matrix. More...
 
EAPI void eina_matrix4_transpose (Eina_Matrix4 *out, const Eina_Matrix4 *in)
 Return the transpose of the given matrix. More...
 
EAPI void eina_matrix4_matrix3_to (Eina_Matrix3 *m3, const Eina_Matrix4 *m4)
 Convert an Eina_Matrix4 into an Eina_Matrix3. More...
 
EAPI void eina_matrix3_matrix4_to (Eina_Matrix4 *m4, const Eina_Matrix3 *m3)
 Convert an Eina_Matrix3 into an Eina_Matrix4. More...
 
EAPI void eina_matrix4_identity (Eina_Matrix4 *out)
 Set an identity matrix. More...
 
EAPI void eina_matrix4_multiply (Eina_Matrix4 *out, const Eina_Matrix4 *a, const Eina_Matrix4 *b)
 Multiply two matrix. More...
 

Detailed Description

{Eina_Matrix_Type} {Eina_Matrix3_F16p16} {Eina_Matrix3}