Commit Graph

15 Commits

Author SHA1 Message Date
Oleksandr Shcherbina 93df8720f9 eina: Fix possible wrong value due to null in determinant of matrix
Reviewers: cedric, Hermet

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3563
2016-01-13 14:04:35 +01:00
se.osadchy ce4146ec63 evas: fix bug with logic with eina_matrix in evas_3d_utils
Summary: Also need to fix logically dead code in coverity.

Reviewers: raster, Hermet, cedric

Subscribers: jpeg

Maniphest Tasks: T2832

Differential Revision: https://phab.enlightenment.org/D3346

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-02 14:15:01 -08:00
Stefan Schmidt a486671bce eina_matrix: optimize multiply and inverse calls by actually using the shortcut
We had this nice shortcuts for multiply and inverse with the identity matrix.
Pity we never used it! The EINA_MATRIX_TYPE_IDENTITY is coming from an enum
without and direct assignments to its internals. Being the first item in the
enum it is most likely will be 0 which makes the whole bitwise AND zero and thus
the optimized path will never get called. If our compiler now decides hew wants
to handle enums differently and does not assign the 0 to the first item this
bitwise operation will be even more screwed. What we really want is to check is
if the type we get for the matrix matches EINA_MATRIX_TYPE_IDENTITY. So better
do this. Made me look into matrix multply and inverse. Fun!

Thanks to smatch for poiting this out.
2015-11-27 00:13:04 +01:00
Carsten Haitzler 43ef6152ed efl - fix eina after misnaming of piblic api
this fixes 3d77f55f91 which added
eina_normal3_matrix_get in the headers as the api, but the actual func
was eina_normal_matrix3_get.
2015-11-10 11:56:01 +09:00
se.osadchy 3d77f55f91 evas: refactor duplicated data structure with eina_matrix.
Summary: Move data structure and functionality to eina_matrix from evas_mat.

Reviewers: raster, Hermet, cedric

Subscribers: Oleksander, cedric

Differential Revision: https://phab.enlightenment.org/D3020

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Cedric BAIL abfe65e05d eina: add eina_matrix4_multiply and eina_matrix4_identity function. 2015-08-21 16:40:31 +02:00
Cedric BAIL 26f33dc6bd eina: add eina_matrix4_transpose. 2015-08-21 16:40:31 +02:00
Cedric BAIL bb926e2dc7 eina: add eina_matrix4_inverse. 2015-08-21 16:40:31 +02:00
Cedric BAIL 694149c773 eina: add eina_matrix4_normalized. 2015-08-21 16:40:31 +02:00
Cedric BAIL 4f0f81bb30 eina: add eina_matrix4_determinant. 2015-08-21 16:40:31 +02:00
Cedric BAIL c82015d062 eina: our 3x3 matrix are 2D matrix, not 3D rotation matrix. 2015-08-21 16:40:31 +02:00
Cedric BAIL 9a83100a4a eina: add the beginning of an Eina_Matrix4 API. 2015-05-29 17:20:28 +02:00
Jean-Philippe Andre 12b562482e Eina: Fix clang warnings
Use fabs for double values
2015-04-21 20:11:01 +09:00
Subhransu Mohanty ee99232b36 eina: updated matrix_translate, matrix_scale and matrix_rotate implementation to do compose of the matrix in not identity matrix.
This is a late change that has been discussing on the ML as we don't want to release an API, we can't make faster.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-17 10:52:16 +02:00
Cedric BAIL 659d3c4fd7 eina: add eina_matrix.
This code come from Enesim and was done by Jorge. I did just take care
of changing the namespace and coding style.
2015-04-03 16:12:48 +02:00