summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_3d_utils.h
diff options
context:
space:
mode:
authorse.osadchy <se.osadchy@samsung.com>2015-12-02 14:14:17 -0800
committerCedric BAIL <cedric@osg.samsung.com>2015-12-02 14:15:01 -0800
commitce4146ec6303671e072ca2cbb29b1fec069faf0c (patch)
treec504c2a7aa3a4f4feb0f32bdf6ff868da7ae338b /src/lib/evas/include/evas_3d_utils.h
parenta19786649f0eba0bafc842c861934647d22074c7 (diff)
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>
Diffstat (limited to 'src/lib/evas/include/evas_3d_utils.h')
-rw-r--r--src/lib/evas/include/evas_3d_utils.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/evas/include/evas_3d_utils.h b/src/lib/evas/include/evas_3d_utils.h
index 52a95116bd..f3d4ed07ff 100644
--- a/src/lib/evas/include/evas_3d_utils.h
+++ b/src/lib/evas/include/evas_3d_utils.h
@@ -373,8 +373,8 @@ evas_vec3_homogeneous_position_transform(Evas_Vec3 *out, const Evas_Vec3 *v, con
373 return; 373 return;
374 } 374 }
375 375
376 tmp.x = (m->xx * v->x) + (m->zw * v->y) + (m->zx * v->z) + m->wx; 376 tmp.x = (m->xx * v->x) + (m->yx * v->y) + (m->zx * v->z) + m->wx;
377 tmp.y = (m->xy * v->x) + (m->yx * v->y) + (m->zy * v->z) + m->wy; 377 tmp.y = (m->xy * v->x) + (m->yy * v->y) + (m->zy * v->z) + m->wy;
378 tmp.z = (m->xz * v->x) + (m->yz * v->y) + (m->zz * v->z) + m->wz; 378 tmp.z = (m->xz * v->x) + (m->yz * v->y) + (m->zz * v->z) + m->wz;
379 379
380 evas_vec3_scale(out, &tmp, 380 evas_vec3_scale(out, &tmp,
@@ -392,8 +392,8 @@ evas_vec3_homogeneous_direction_transform(Evas_Vec3 *out, const Evas_Vec3 *v, co
392 return; 392 return;
393 } 393 }
394 394
395 tmp.x = (m->xx * v->x) + (m->zw * v->y) + (m->zx * v->z); 395 tmp.x = (m->xx * v->x) + (m->yx * v->y) + (m->zx * v->z);
396 tmp.y = (m->xy * v->x) + (m->yx * v->y) + (m->zy * v->z); 396 tmp.y = (m->xy * v->x) + (m->yy * v->y) + (m->zy * v->z);
397 tmp.z = (m->xz * v->x) + (m->yz * v->y) + (m->zz * v->z); 397 tmp.z = (m->xz * v->x) + (m->yz * v->y) + (m->zz * v->z);
398 398
399 evas_vec3_copy(out, &tmp); 399 evas_vec3_copy(out, &tmp);
@@ -953,17 +953,17 @@ evas_mat4_build(Eina_Matrix4 *out,
953 evas_vec4_quaternion_rotation_matrix_get(orientation, &rot); 953 evas_vec4_quaternion_rotation_matrix_get(orientation, &rot);
954 954
955 out->xx = scale->x * rot.xx; 955 out->xx = scale->x * rot.xx;
956 out->xy = scale->y * rot.xy; 956 out->xy = scale->x * rot.xy;
957 out->xz = scale->z * rot.xz; 957 out->xz = scale->x * rot.xz;
958 out->xw = 0.0; 958 out->xw = 0.0;
959 959
960 out->yx = scale->x * rot.yx; 960 out->yx = scale->y * rot.yx;
961 out->yy = scale->y * rot.yy; 961 out->yy = scale->y * rot.yy;
962 out->yz = scale->z * rot.yz; 962 out->yz = scale->y * rot.yz;
963 out->yw = 0.0; 963 out->yw = 0.0;
964 964
965 out->zx = scale->x * rot.zx; 965 out->zx = scale->z * rot.zx;
966 out->zy = scale->y * rot.zy; 966 out->zy = scale->z * rot.zy;
967 out->zz = scale->z * rot.zz; 967 out->zz = scale->z * rot.zz;
968 out->zw = 0.0; 968 out->zw = 0.0;
969 969
@@ -998,17 +998,17 @@ evas_mat4_inverse_build(Eina_Matrix4 *out, const Evas_Vec3 *position,
998 evas_vec4_quaternion_rotation_matrix_get(&inv_rotation, &rot); 998 evas_vec4_quaternion_rotation_matrix_get(&inv_rotation, &rot);
999 999
1000 out->xx = inv_scale.x * rot.xx; 1000 out->xx = inv_scale.x * rot.xx;
1001 out->xy = inv_scale.y * rot.xy; 1001 out->xy = inv_scale.x * rot.xy;
1002 out->xz = inv_scale.z * rot.xz; 1002 out->xz = inv_scale.x * rot.xz;
1003 out->xw = 0.0; 1003 out->xw = 0.0;
1004 1004
1005 out->yx = inv_scale.x * rot.yx; 1005 out->yx = inv_scale.y * rot.yx;
1006 out->yy = inv_scale.y * rot.yy; 1006 out->yy = inv_scale.y * rot.yy;
1007 out->yz = inv_scale.z * rot.yz; 1007 out->yz = inv_scale.y * rot.yz;
1008 out->yw = 0.0; 1008 out->yw = 0.0;
1009 1009
1010 out->zx = inv_scale.x * rot.zx; 1010 out->zx = inv_scale.z * rot.zx;
1011 out->zy = inv_scale.y * rot.zy; 1011 out->zy = inv_scale.z * rot.zy;
1012 out->zz = inv_scale.z * rot.zz; 1012 out->zz = inv_scale.z * rot.zz;
1013 out->zw = 0.0; 1013 out->zw = 0.0;
1014 1014