Tizen Native API  3.0
4x4 Matrices in floating point

Matrix definition and operations.

Functions

Eina_Matrix_Type eina_matrix4_type_get (const Eina_Matrix4 *m)
 Returns the type of the given floating point matrix.
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.
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.
double eina_matrix4_determinant (const Eina_Matrix4 *m)
 Returns the determinant of the given matrix.
Eina_Bool eina_matrix4_normalized (Eina_Matrix4 *out, const Eina_Matrix4 *in)
 Returns the determinant of the given matrix.
Eina_Bool eina_matrix4_inverse (Eina_Matrix4 *out, const Eina_Matrix4 *in)
 Returns the inverse of the given matrix.
void eina_matrix4_transpose (Eina_Matrix4 *out, const Eina_Matrix4 *in)
 Returns the transpose of the given matrix.
void eina_matrix4_matrix3_to (Eina_Matrix3 *m3, const Eina_Matrix4 *m4)
 Converts an Eina_Matrix4 into an Eina_Matrix3.
void eina_matrix4_identity (Eina_Matrix4 *out)
 Sets an identity matrix.
void eina_matrix4_multiply_copy (Eina_Matrix4 *out, const Eina_Matrix4 *mat_a, const Eina_Matrix4 *mat_b)
 Multiplies two matrix.
void eina_matrix4_array_set (Eina_Matrix4 *m, const double *v)
 Sets array to matrix.
void eina_matrix4_copy (Eina_Matrix4 *dst, const Eina_Matrix4 *src)
 Copies matrix.
void eina_matrix4_multiply (Eina_Matrix4 *out, const Eina_Matrix4 *mat_a, const Eina_Matrix4 *mat_b)
 Multiplies two matrix with check.
void eina_matrix4_ortho_set (Eina_Matrix4 *m, double left, double right, double bottom, double top, double dnear, double dfar)
 Sets orthogonality matrix.

Typedefs

typedef struct _Eina_Matrix4 Eina_Matrix4

Typedef Documentation

Floating point matrix4 handler


Function Documentation

void eina_matrix4_array_set ( Eina_Matrix4 m,
const double *  v 
)

Sets array to matrix.

Parameters:
mThe result matrix
vThe the array[16] for set

Set to matrix first 16 elements from array

Since (EFL) :
1.17
Since :
3.0
void eina_matrix4_copy ( Eina_Matrix4 dst,
const Eina_Matrix4 src 
)

Copies matrix.

Parameters:
dstThe matrix copy
srcThe matrix for copy.
Since (EFL) :
1.17
Since :
3.0
double eina_matrix4_determinant ( const Eina_Matrix4 m)

Returns the determinant of the given matrix.

Parameters:
mThe matrix.
Returns:
The determinant.

This function returns the determinant of the matrix m. No check is done on m.

Since (EFL) :
1.16
Since :
3.0

Sets an identity matrix.

Parameters:
outThe matrix to set
Since (EFL) :
1.16
Since :
3.0

Returns the inverse of the given matrix.

Parameters:
outThe inverse matrix
inThe matrix.
Returns:
EINA_TRUE on success, EINA_FALSE otherwise.
Since (EFL) :
1.16
Since :
3.0
void eina_matrix4_matrix3_to ( Eina_Matrix3 m3,
const Eina_Matrix4 m4 
)

Converts an Eina_Matrix4 into an Eina_Matrix3.

Parameters:
m3The destination Eina_Matrix3.
m4The source Eina_Matrix4.
Since (EFL) :
1.15
Since :
3.0
void eina_matrix4_multiply ( Eina_Matrix4 out,
const Eina_Matrix4 mat_a,
const Eina_Matrix4 mat_b 
)

Multiplies two matrix with check.

Parameters:
outThe resulting matrix
aThe first member of the multiplication
bThe second member of the multiplication
Since (EFL) :
1.17
Since :
3.0
void eina_matrix4_multiply_copy ( Eina_Matrix4 out,
const Eina_Matrix4 mat_a,
const Eina_Matrix4 mat_b 
)

Multiplies two matrix.

Parameters:
outThe resulting matrix
aThe first member of the multiplication
bThe second member of the multiplication
Since (EFL) :
1.17
Since :
3.0

Returns the determinant of the given matrix.

Parameters:
mThe matrix.
Returns:
The determinant.

This function returns the determinant of the matrix m. No check is done on m.

Since (EFL) :
1.16
Since :
3.0
void eina_matrix4_ortho_set ( Eina_Matrix4 m,
double  left,
double  right,
double  bottom,
double  top,
double  dnear,
double  dfar 
)

Sets orthogonality matrix.

Parameters:
mThe resulting matrix
rightThe right value
leftThe left value
bottomThe bottom value
topThe top value
dneatThe dnear value
dfarThe dfar value
Since (EFL) :
1.17
Since :
3.0
void eina_matrix4_transpose ( Eina_Matrix4 out,
const Eina_Matrix4 in 
)

Returns the transpose of the given matrix.

Parameters:
outThe transpose matrix
inThe matrix.

Just going to swap row and column.

Since (EFL) :
1.16
Since :
3.0

Returns the type of the given floating point matrix.

Parameters:
mThe floating point matrix.
Returns:
The type of the matrix.

This function returns the type of the matrix m. No check is done on m.

Since (EFL) :
1.15
Since :
3.0
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.

Parameters:
mThe floating point matrix.
xxThe first coefficient value.
xyThe second coefficient value.
xzThe third coefficient value.
xwThe fourth coefficient value.
yxThe fifth coefficient value.
yyThe sixth coefficient value.
yzThe seventh coefficient value.
ywThe heighth coefficient value.
zxThe nineth coefficient value.
zyThe tenth coefficient value.
zzThe eleventh coefficient value.
zwThe twelfth coefficient value.
wxThe thirteenth coefficient value.
wyThe fourteenth coefficient value.
wzThe fifteenth coefficient value.
wwThe sizteenth coefficient value.

This function gets the values of the coefficients of the matrix m. No check is done on m.

See also:
eina_matrix4_values_set()
Since (EFL) :
1.15
Since :
3.0
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.

Parameters:
mThe floating point matrix.
xxThe first coefficient value.
xyThe second coefficient value.
xzThe third coefficient value.
xwThe fourth coefficient value.
yxThe fifth coefficient value.
yyThe sixth coefficient value.
yzThe seventh coefficient value.
ywThe heighth coefficient value.
zxThe nineth coefficient value.
zyThe tenth coefficient value.
zzThe eleventh coefficient value.
zwThe twelfth coefficient value.
wxThe thirteenth coefficient value.
wyThe fourteenth coefficient value.
wzThe fifteenth coefficient value.
wwThe sizteenth coefficient value.

This function sets the values of the coefficients of the matrix m. No check is done on m.

See also:
eina_matrix4_values_get()
Since (EFL) :
1.15
Since :
3.0