summaryrefslogtreecommitdiff
path: root/src/modules/evas
diff options
context:
space:
mode:
authorse.osadchy <se.osadchy@samsung.com>2016-02-17 14:26:40 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-02-17 16:12:35 +0900
commit780ec5d0297c3645033b64f4e0723c579e12e491 (patch)
tree7130e1e95436eddf0c8b319c832bc1f4fa9afbee /src/modules/evas
parenta1584c8a5db0bdacd8f14669f77d2c4f4de4d1c3 (diff)
evas: Update evas_3d_utils, replace Evas_Vec.
Summary: Change Evas_Vec2(3) to Eina_Vector2(3). Reviewers: cedric, Hermet, jpeg Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3686
Diffstat (limited to 'src/modules/evas')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_3d.c20
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_3d_private.h4
2 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_3d.c b/src/modules/evas/engines/gl_common/evas_gl_3d.c
index 3bacf2c9be..fd3e26451e 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_3d.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_3d.c
@@ -899,7 +899,7 @@ _light_build(E3D_Draw_Data *data,
899 Evas_Canvas3D_Node_Data *pd_light_node = eo_data_scope_get(light, EVAS_CANVAS3D_NODE_CLASS); 899 Evas_Canvas3D_Node_Data *pd_light_node = eo_data_scope_get(light, EVAS_CANVAS3D_NODE_CLASS);
900 Evas_Canvas3D_Light *l = pd_light_node ? pd_light_node->data.light.light : NULL; 900 Evas_Canvas3D_Light *l = pd_light_node ? pd_light_node->data.light.light : NULL;
901 Evas_Canvas3D_Light_Data *pdl = l ? eo_data_scope_get(l, EVAS_CANVAS3D_LIGHT_CLASS) : NULL; 901 Evas_Canvas3D_Light_Data *pdl = l ? eo_data_scope_get(l, EVAS_CANVAS3D_LIGHT_CLASS) : NULL;
902 Evas_Vec3 pos, dir; 902 Eina_Vector3 pos, dir;
903 903
904 if (pdl == NULL) 904 if (pdl == NULL)
905 return; 905 return;
@@ -910,12 +910,12 @@ _light_build(E3D_Draw_Data *data,
910 data->flags |= E3D_SHADER_FLAG_LIGHT_DIRECTIONAL; 910 data->flags |= E3D_SHADER_FLAG_LIGHT_DIRECTIONAL;
911 911
912 /* Negative Z. */ 912 /* Negative Z. */
913 evas_vec3_set(&dir, 0.0, 0.0, 1.0); 913 eina_vector3_set(&dir, 0.0, 0.0, 1.0);
914 evas_vec3_quaternion_rotate(&dir, &dir, &pd_light_node->orientation); 914 eina_vector3_quaternion_rotate(&dir, &dir, &pd_light_node->orientation);
915 915
916 /* Transform to eye space. */ 916 /* Transform to eye space. */
917 evas_vec3_homogeneous_direction_transform(&dir, &dir, matrix_eye); 917 eina_vector3_homogeneous_direction_transform(&dir, matrix_eye, &dir);
918 evas_vec3_normalize(&dir, &dir); 918 eina_vector3_normalize(&dir, &dir);
919 919
920 data->light.position.x = dir.x; 920 data->light.position.x = dir.x;
921 data->light.position.y = dir.y; 921 data->light.position.y = dir.y;
@@ -924,8 +924,8 @@ _light_build(E3D_Draw_Data *data,
924 } 924 }
925 else 925 else
926 { 926 {
927 evas_vec3_copy(&pos, &pd_light_node->position_world); 927 eina_vector3_copy(&pos, &pd_light_node->position_world);
928 evas_vec3_homogeneous_position_transform(&pos, &pos, matrix_eye); 928 eina_vector3_homogeneous_position_transform(&pos, matrix_eye, &pos);
929 929
930 data->light.position.x = pos.x; 930 data->light.position.x = pos.x;
931 data->light.position.y = pos.y; 931 data->light.position.y = pos.y;
@@ -944,9 +944,9 @@ _light_build(E3D_Draw_Data *data,
944 if (pdl->spot_cutoff < 180.0) 944 if (pdl->spot_cutoff < 180.0)
945 { 945 {
946 data->flags |= E3D_SHADER_FLAG_LIGHT_SPOT; 946 data->flags |= E3D_SHADER_FLAG_LIGHT_SPOT;
947 evas_vec3_set(&dir, 0.0, 0.0, -1.0); 947 eina_vector3_set(&dir, 0.0, 0.0, -1.0);
948 evas_vec3_quaternion_rotate(&dir, &dir, &pd_light_node->orientation); 948 eina_vector3_quaternion_rotate(&dir, &dir, &pd_light_node->orientation);
949 evas_vec3_homogeneous_direction_transform(&dir, &dir, matrix_eye); 949 eina_vector3_homogeneous_direction_transform(&dir, matrix_eye, &dir);
950 950
951 data->light.spot_dir = dir; 951 data->light.spot_dir = dir;
952 data->light.spot_exp = pdl->spot_exp; 952 data->light.spot_exp = pdl->spot_exp;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_3d_private.h b/src/modules/evas/engines/gl_common/evas_gl_3d_private.h
index 94780937cf..da508d2354 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_3d_private.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_3d_private.h
@@ -98,10 +98,10 @@ struct _E3D_Draw_Data
98 98
99 struct { 99 struct {
100 Eina_Quaternion position; 100 Eina_Quaternion position;
101 Evas_Vec3 spot_dir; 101 Eina_Vector3 spot_dir;
102 Evas_Real spot_exp; 102 Evas_Real spot_exp;
103 Evas_Real spot_cutoff_cos; 103 Evas_Real spot_cutoff_cos;
104 Evas_Vec3 atten; 104 Eina_Vector3 atten;
105 Evas_Color ambient; 105 Evas_Color ambient;
106 Evas_Color diffuse; 106 Evas_Color diffuse;
107 Evas_Color specular; 107 Evas_Color specular;