summaryrefslogtreecommitdiff
path: root/src/examples/evas/evas-3d-pick.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-09 15:47:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-09 16:09:14 +0000
commit4f949a2757b6332306264d7f126b15ba7bfd37d4 (patch)
treeec3a3aacfe34b2b3e75f3fc4d85531f6f4957c9d /src/examples/evas/evas-3d-pick.c
parentdf83edaeb6b10324868f28e8f1910147ba22e5e5 (diff)
downloadefl-4f949a2757b6332306264d7f126b15ba7bfd37d4.tar.gz
Automatic migration to the new eo_add syntax.
Diffstat (limited to 'src/examples/evas/evas-3d-pick.c')
-rw-r--r--src/examples/evas/evas-3d-pick.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c
index 1ae79a8cc9..86ee222b8a 100644
--- a/src/examples/evas/evas-3d-pick.c
+++ b/src/examples/evas/evas-3d-pick.c
@@ -132,32 +132,31 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
- scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
+ eo_add(&scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
- root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_NODE));
+ eo_add(&root_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(root_node, EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
- camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
+ eo_add(&camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
evas_canvas3d_camera_projection_perspective_set(camera, 30.0, 1.0, 1.0, 100.0);
- camera_node =
- eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
+ eo_add(&camera_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(camera_node, EVAS_CANVAS3D_NODE_TYPE_CAMERA));
evas_canvas3d_node_camera_set(camera_node, camera);
evas_canvas3d_node_position_set(camera_node, 0.0, 0.0, 2.5);
evas_canvas3d_node_look_at_set(camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
evas_canvas3d_node_member_add(root_node, camera_node);
- sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
+ eo_add(&sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
evas_canvas3d_primitive_form_set(sphere, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE);
evas_canvas3d_primitive_precision_set(sphere, 50);
- mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
+ eo_add(&mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
evas_canvas3d_mesh_from_primitive_set(mesh, 0, sphere);
- material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
+ eo_add(&material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
- texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
+ eo_add(&texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
evas_canvas3d_texture_file_set(texture_diffuse, image_path, NULL);
evas_canvas3d_texture_filter_set(texture_diffuse, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR, EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR);
evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture_diffuse);
@@ -169,7 +168,7 @@ main(void)
evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0);
evas_canvas3d_material_shininess_set(material, 50.0);
- mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(eoid, EVAS_CANVAS3D_NODE_TYPE_MESH));
+ eo_add(&mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(mesh_node, EVAS_CANVAS3D_NODE_TYPE_MESH));
evas_canvas3d_node_member_add(root_node, mesh_node);
evas_canvas3d_node_mesh_add(mesh_node, mesh);
@@ -182,7 +181,7 @@ main(void)
evas_canvas3d_scene_size_set(scene, WIDTH, HEIGHT);
/* Add evas objects. */
- background = eo_add(EVAS_RECTANGLE_CLASS, evas);
+ eo_add(&background, EVAS_RECTANGLE_CLASS, evas);
efl_gfx_color_set(background, 0, 0, 0, 255);
efl_gfx_size_set(background, WIDTH, HEIGHT);
efl_gfx_visible_set(background, EINA_TRUE);