diff options
Diffstat (limited to 'src/examples/evas/evas-3d-fog.c')
-rw-r--r-- | src/examples/evas/evas-3d-fog.c | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/src/examples/evas/evas-3d-fog.c b/src/examples/evas/evas-3d-fog.c index 5154288112..a767c2d1d8 100644 --- a/src/examples/evas/evas-3d-fog.c +++ b/src/examples/evas/evas-3d-fog.c @@ -72,7 +72,7 @@ _animate_scene(void *data) angle += 0.5; eo_do(scene->animation_node, - evas_3d_node_orientation_angle_axis_set(angle, 0.0, 1.0, 0.0)); + evas_canvas3d_node_orientation_angle_axis_set(angle, 0.0, 1.0, 0.0)); if (angle > 360.0) angle -= 360.0f; @@ -82,125 +82,125 @@ _animate_scene(void *data) static void _camera_setup(Scene_Data *data) { - data->camera = eo_add(EVAS_3D_CAMERA_CLASS, evas); + data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas); eo_do(data->camera, - evas_3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0)); + evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0)); data->camera_node = - eo_add(EVAS_3D_NODE_CLASS, evas, - evas_3d_node_constructor(EVAS_3D_NODE_TYPE_CAMERA)); + eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, + evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA)); eo_do(data->camera_node, - evas_3d_node_camera_set(data->camera), - evas_3d_node_position_set(0.0, 0.0, 7.0), - evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 0.0, - EVAS_3D_SPACE_PARENT, 0.0, 1.0, 0.0)); + evas_canvas3d_node_camera_set(data->camera), + evas_canvas3d_node_position_set(0.0, 0.0, 7.0), + evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, + EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0)); - eo_do(data->root_node, evas_3d_node_member_add(data->camera_node)); + eo_do(data->root_node, evas_canvas3d_node_member_add(data->camera_node)); } static void _light_setup(Scene_Data *data) { - data->light = eo_add(EVAS_3D_LIGHT_CLASS, evas); + data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas); eo_do(data->light, - evas_3d_light_ambient_set(0.2, 0.2, 0.2, 1.0), - evas_3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), - evas_3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); + evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0), + evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0), + evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0)); data->light_node = - eo_add(EVAS_3D_NODE_CLASS, evas, - evas_3d_node_constructor(EVAS_3D_NODE_TYPE_LIGHT)); + eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, + evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT)); eo_do(data->light_node, - evas_3d_node_light_set(data->light), - evas_3d_node_position_set(0.0, 0.0, 10.0), - evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 0.0, - EVAS_3D_SPACE_PARENT, 0.0, 1.0, 0.0)); - eo_do(data->root_node, evas_3d_node_member_add(data->light_node)); + evas_canvas3d_node_light_set(data->light), + evas_canvas3d_node_position_set(0.0, 0.0, 10.0), + evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0, + EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0)); + eo_do(data->root_node, evas_canvas3d_node_member_add(data->light_node)); } static void -_set_ball(Eo *mesh, Eo *sphere, Evas_3D_Material *material) +_set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material) { - eo_do(mesh, - evas_3d_mesh_from_primitive_set(0, sphere), - evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_PHONG), - evas_3d_mesh_frame_material_set(0, material)); + eo_do(mesh, + evas_canvas3d_mesh_from_primitive_set(0, sphere), + evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG), + evas_canvas3d_mesh_frame_material_set(0, material)); } static void _mesh_setup(Scene_Data *data) { - data->material = eo_add(EVAS_3D_MATERIAL_CLASS, evas); + data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); eo_do(data->material, - evas_3d_material_enable_set(EVAS_3D_MATERIAL_AMBIENT, EINA_TRUE), - evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE, EINA_TRUE), - evas_3d_material_enable_set(EVAS_3D_MATERIAL_SPECULAR, EINA_TRUE), + evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_AMBIENT, EINA_TRUE), + evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_DIFFUSE, EINA_TRUE), + evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_SPECULAR, EINA_TRUE), - evas_3d_material_color_set(EVAS_3D_MATERIAL_AMBIENT, 0.2, 0.2, 0.2, 1.0), - evas_3d_material_color_set(EVAS_3D_MATERIAL_DIFFUSE, 0.8, 0.8, 0.8, 1.0), - evas_3d_material_color_set(EVAS_3D_MATERIAL_SPECULAR, 1.0, 1.0, 1.0, 1.0), - evas_3d_material_shininess_set(100.0)); + evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_AMBIENT, 0.2, 0.2, 0.2, 1.0), + evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_DIFFUSE, 0.8, 0.8, 0.8, 1.0), + evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_SPECULAR, 1.0, 1.0, 1.0, 1.0), + evas_canvas3d_material_shininess_set(100.0)); - data->sphere = eo_add(EVAS_3D_PRIMITIVE_CLASS, evas); + data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas); eo_do(data->sphere, - evas_3d_primitive_form_set(EVAS_3D_MESH_PRIMITIVE_SPHERE), - evas_3d_primitive_precision_set(50)); + evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE), + evas_canvas3d_primitive_precision_set(50)); - data->mesh = eo_add(EVAS_3D_MESH_CLASS, evas); - data->mesh1 = eo_add(EVAS_3D_MESH_CLASS, evas); + data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); + data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); _set_ball(data->mesh, data->sphere, data->material); _set_ball(data->mesh1, data->sphere, data->material); data->animation_node = - eo_add(EVAS_3D_NODE_CLASS, evas, - evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); + eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, + evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE)); data->mesh_node = - eo_add(EVAS_3D_NODE_CLASS, evas, - evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); + eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, + evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); - eo_do(data->animation_node, evas_3d_node_member_add(data->mesh_node)); - eo_do(data->root_node, evas_3d_node_member_add(data->animation_node)); - eo_do(data->mesh_node, evas_3d_node_mesh_add(data->mesh), - evas_3d_node_position_set(0.0, 0.0, 3.0)); + eo_do(data->animation_node, evas_canvas3d_node_member_add(data->mesh_node)); + eo_do(data->root_node, evas_canvas3d_node_member_add(data->animation_node)); + eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh), + evas_canvas3d_node_position_set(0.0, 0.0, 3.0)); data->mesh_node1 = - eo_add(EVAS_3D_NODE_CLASS, evas, - evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH)); + eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, + evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); - eo_do(data->root_node, evas_3d_node_member_add(data->mesh_node1)); - eo_do(data->mesh_node1, evas_3d_node_mesh_add(data->mesh1), - evas_3d_node_scale_set(3, 3, 3)); + eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node1)); + eo_do(data->mesh_node1, evas_canvas3d_node_mesh_add(data->mesh1), + evas_canvas3d_node_scale_set(3, 3, 3)); - eo_do(data->mesh, evas_3d_mesh_fog_enable_set(EINA_TRUE), evas_3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR)); - eo_do(data->mesh1, evas_3d_mesh_fog_enable_set(EINA_TRUE), evas_3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR)); + eo_do(data->mesh, evas_canvas3d_mesh_fog_enable_set(EINA_TRUE), evas_canvas3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR)); + eo_do(data->mesh1, evas_canvas3d_mesh_fog_enable_set(EINA_TRUE), evas_canvas3d_mesh_fog_color_set(FOG_COLOR, FOG_FACTOR)); } static void _scene_setup(Scene_Data *data) { - data->scene = eo_add(EVAS_3D_SCENE_CLASS, evas); + data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas); eo_do(data->scene, - evas_3d_scene_size_set(WIDTH, HEIGHT); - evas_3d_scene_background_color_set(FOG_COLOR, 1)); + evas_canvas3d_scene_size_set(WIDTH, HEIGHT); + evas_canvas3d_scene_background_color_set(FOG_COLOR, 1)); data->root_node = - eo_add(EVAS_3D_NODE_CLASS, evas, - evas_3d_node_constructor(EVAS_3D_NODE_TYPE_NODE)); + eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, + evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE)); _camera_setup(data); _light_setup(data); _mesh_setup(data); eo_do(data->scene, - evas_3d_scene_root_node_set(data->root_node), - evas_3d_scene_camera_node_set(data->camera_node)); + evas_canvas3d_scene_root_node_set(data->root_node), + evas_canvas3d_scene_camera_node_set(data->camera_node)); } int |