summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_canvas3d_scene.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_canvas3d_scene.c')
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c b/src/lib/evas/canvas/evas_canvas3d_scene.c
index 3030704..c7b229e 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -44,15 +44,15 @@ _evas_canvas3d_scene_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Eva
44{ 44{
45 if (pd->root_node) 45 if (pd->root_node)
46 { 46 {
47 eo_do(pd->root_node, evas_canvas3d_object_update()); 47 evas_canvas3d_object_update(pd->root_node);
48 } 48 }
49 49
50 if (pd->camera_node) 50 if (pd->camera_node)
51 { 51 {
52 eo_do(pd->camera_node, evas_canvas3d_object_update()); 52 evas_canvas3d_object_update(pd->camera_node);
53 } 53 }
54 54
55 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_UPDATED, NULL)); 55 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_UPDATED, NULL);
56} 56}
57 57
58EAPI Evas_Canvas3D_Scene * 58EAPI Evas_Canvas3D_Scene *
@@ -68,8 +68,8 @@ evas_canvas3d_scene_add(Evas *e)
68EOLIAN static Eo * 68EOLIAN static Eo *
69_evas_canvas3d_scene_eo_base_constructor(Eo *obj, Evas_Canvas3D_Scene_Data *pd) 69_evas_canvas3d_scene_eo_base_constructor(Eo *obj, Evas_Canvas3D_Scene_Data *pd)
70{ 70{
71 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 71 obj = eo_constructor(eo_super(obj, MY_CLASS));
72 eo_do(obj, evas_canvas3d_object_type_set(EVAS_CANVAS3D_OBJECT_TYPE_SCENE)); 72 evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_SCENE);
73 evas_color_set(&pd->bg_color, 0.0, 0.0, 0.0, 0.0); 73 evas_color_set(&pd->bg_color, 0.0, 0.0, 0.0, 0.0);
74 pd->shadows_enabled = EINA_FALSE; 74 pd->shadows_enabled = EINA_FALSE;
75 pd->color_pick_enabled = EINA_FALSE; 75 pd->color_pick_enabled = EINA_FALSE;
@@ -101,7 +101,7 @@ _evas_canvas3d_scene_root_node_set(Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_C
101 evas_canvas3d_node_scene_root_add(node, obj); 101 evas_canvas3d_node_scene_root_add(node, obj);
102 } 102 }
103 103
104 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_ROOT_NODE, NULL)); 104 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_ROOT_NODE, NULL);
105} 105}
106 106
107EOLIAN static Evas_Canvas3D_Node * 107EOLIAN static Evas_Canvas3D_Node *
@@ -130,7 +130,7 @@ _evas_canvas3d_scene_camera_node_set(Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas
130 evas_canvas3d_node_scene_camera_add(node, obj); 130 evas_canvas3d_node_scene_camera_add(node, obj);
131 } 131 }
132 132
133 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_CAMERA_NODE, NULL)); 133 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_CAMERA_NODE, NULL);
134} 134}
135 135
136EOLIAN static Evas_Canvas3D_Node * 136EOLIAN static Evas_Canvas3D_Node *
@@ -144,7 +144,7 @@ _evas_canvas3d_scene_size_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd,
144{ 144{
145 pd->w = w; 145 pd->w = w;
146 pd->h = h; 146 pd->h = h;
147 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_SIZE, NULL)); 147 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_SIZE, NULL);
148} 148}
149 149
150EOLIAN static void 150EOLIAN static void
@@ -159,7 +159,7 @@ _evas_canvas3d_scene_background_color_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Sce
159 Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) 159 Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
160{ 160{
161 evas_color_set(&pd->bg_color, r, g, b, a); 161 evas_color_set(&pd->bg_color, r, g, b, a);
162 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_BACKGROUND_COLOR, NULL)); 162 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_BACKGROUND_COLOR, NULL);
163} 163}
164 164
165EOLIAN static void 165EOLIAN static void
@@ -635,7 +635,7 @@ _evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real
635 scene_data.shadows_enabled = pd->shadows_enabled; 635 scene_data.shadows_enabled = pd->shadows_enabled;
636 scene_data.camera_node = pd->camera_node; 636 scene_data.camera_node = pd->camera_node;
637 scene_data.color_pick_enabled = pd->color_pick_enabled; 637 scene_data.color_pick_enabled = pd->color_pick_enabled;
638 eo_do(obj, update_scene = evas_canvas3d_object_dirty_get(EVAS_CANVAS3D_STATE_SCENE_UPDATED)); 638 update_scene = evas_canvas3d_object_dirty_get(obj, EVAS_CANVAS3D_STATE_SCENE_UPDATED);
639 if (update_scene) 639 if (update_scene)
640 { 640 {
641 if (pd->node_mesh_colors) 641 if (pd->node_mesh_colors)
@@ -675,7 +675,7 @@ _evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real
675 675
676 /*Calling callback clicked*/ 676 /*Calling callback clicked*/
677 eo_desc = eo_base_legacy_only_event_description_get("clicked,private"); 677 eo_desc = eo_base_legacy_only_event_description_get("clicked,private");
678 eo_do(picked_node, eo_event_callback_call(eo_desc, picked_node)); 678 eo_event_callback_call(picked_node, eo_desc, picked_node);
679 679
680 return EINA_TRUE; 680 return EINA_TRUE;
681 } 681 }
@@ -691,7 +691,7 @@ _evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real
691 return EINA_FALSE; 691 return EINA_FALSE;
692 } 692 }
693 /* Update the scene graph. */ 693 /* Update the scene graph. */
694 eo_do(obj, evas_canvas3d_object_update()); 694 evas_canvas3d_object_update(obj);
695 pd_camera_node = eo_data_scope_get(pd->camera_node, EVAS_CANVAS3D_NODE_CLASS); 695 pd_camera_node = eo_data_scope_get(pd->camera_node, EVAS_CANVAS3D_NODE_CLASS);
696 pd_camera = eo_data_scope_get(pd_camera_node->data.camera.camera, EVAS_CANVAS3D_CAMERA_CLASS); 696 pd_camera = eo_data_scope_get(pd_camera_node->data.camera.camera, EVAS_CANVAS3D_CAMERA_CLASS);
697 eina_matrix4_multiply(&data.matrix_vp, 697 eina_matrix4_multiply(&data.matrix_vp,
@@ -714,7 +714,7 @@ _evas_canvas3d_scene_pick(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Real
714 714
715 /*Calling callback clicked*/ 715 /*Calling callback clicked*/
716 eo_desc = eo_base_legacy_only_event_description_get("clicked,private"); 716 eo_desc = eo_base_legacy_only_event_description_get("clicked,private");
717 eo_do(data.node, eo_event_callback_call(eo_desc, data.node)); 717 eo_event_callback_call(data.node, eo_desc, data.node);
718 718
719 return EINA_TRUE; 719 return EINA_TRUE;
720} 720}
@@ -737,7 +737,7 @@ _evas_canvas3d_scene_exist(const Eo *obj, Evas_Canvas3D_Scene_Data *pd, Evas_Rea
737 data.t = 0.0; 737 data.t = 0.0;
738 738
739 /* Update the scene graph. */ 739 /* Update the scene graph. */
740 eo_do(obj, evas_canvas3d_object_update()); 740 evas_canvas3d_object_update(obj);
741 pd_camera_node = eo_data_scope_get(pd->camera_node, EVAS_CANVAS3D_NODE_CLASS); 741 pd_camera_node = eo_data_scope_get(pd->camera_node, EVAS_CANVAS3D_NODE_CLASS);
742 pd_camera = eo_data_scope_get(pd_camera_node->data.camera.camera, EVAS_CANVAS3D_CAMERA_CLASS); 742 pd_camera = eo_data_scope_get(pd_camera_node->data.camera.camera, EVAS_CANVAS3D_CAMERA_CLASS);
743 eina_matrix4_multiply(&data.matrix_vp, 743 eina_matrix4_multiply(&data.matrix_vp,
@@ -763,18 +763,18 @@ _evas_canvas3d_scene_pick_member_list_get(const Eo *obj, Evas_Canvas3D_Scene_Dat
763 Eina_Bool pick = EINA_FALSE; 763 Eina_Bool pick = EINA_FALSE;
764 764
765 /* Check pick for given scene. */ 765 /* Check pick for given scene. */
766 eo_do(obj, pick = evas_canvas3d_scene_pick(x, y, NULL, NULL, NULL, NULL)); 766 pick = evas_canvas3d_scene_pick(obj, x, y, NULL, NULL, NULL, NULL);
767 767
768 if (!pick) 768 if (!pick)
769 return NULL; 769 return NULL;
770 770
771 /* Get all members from root node. */ 771 /* Get all members from root node. */
772 eo_do(pd->root_node, list = evas_canvas3d_node_member_list_get()); 772 list = evas_canvas3d_node_member_list_get(pd->root_node);
773 773
774 EINA_LIST_FOREACH(list, l, node) 774 EINA_LIST_FOREACH(list, l, node)
775 { 775 {
776 Evas_Canvas3D_Node *exists; 776 Evas_Canvas3D_Node *exists;
777 if (eo_do_ret(obj, exists, evas_canvas3d_scene_exist(x, y, node))) 777 if (evas_canvas3d_scene_exist(obj, x, y, node))
778 picked_nodes = eina_list_append(picked_nodes, l); 778 picked_nodes = eina_list_append(picked_nodes, l);
779 } 779 }
780 780
@@ -791,7 +791,7 @@ EOLIAN static void
791_evas_canvas3d_scene_shadows_enable_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd, Eina_Bool _shadows_enabled) 791_evas_canvas3d_scene_shadows_enable_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_Data *pd, Eina_Bool _shadows_enabled)
792{ 792{
793 pd->shadows_enabled = _shadows_enabled; 793 pd->shadows_enabled = _shadows_enabled;
794 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_SHADOWS_ENABLED, NULL)); 794 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_SHADOWS_ENABLED, NULL);
795} 795}
796 796
797EOLIAN static Eina_Bool 797EOLIAN static Eina_Bool
@@ -806,7 +806,7 @@ _evas_canvas3d_scene_color_pick_enable_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Sc
806 if (pd->color_pick_enabled != _enabled) 806 if (pd->color_pick_enabled != _enabled)
807 pd->color_pick_enabled = _enabled; 807 pd->color_pick_enabled = _enabled;
808 808
809 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_UPDATED, NULL)); 809 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_UPDATED, NULL);
810 return EINA_TRUE; 810 return EINA_TRUE;
811} 811}
812 812
@@ -816,7 +816,7 @@ _evas_canvas3d_scene_shadows_depth_set(Eo *obj EINA_UNUSED, Evas_Canvas3D_Scene_
816{ 816{
817 pd->depth_offset = depth_offset; 817 pd->depth_offset = depth_offset;
818 pd->depth_constant = depth_constant; 818 pd->depth_constant = depth_constant;
819 eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_SCENE_SHADOWS_DEPTH, NULL)); 819 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_SCENE_SHADOWS_DEPTH, NULL);
820} 820}
821 821
822EOLIAN static void 822EOLIAN static void