diff options
author | Oleksandr Shcherbina <o.shcherbina@samsung.com> | 2016-03-18 11:55:04 -0700 |
---|---|---|
committer | Cedric Bail <cedric@osg.samsung.com> | 2016-03-18 11:55:07 -0700 |
commit | bd200cefc44cb8b03ef465791b4dfc6b6cec85be (patch) | |
tree | 5ad057325aaa386dbf25169d985f9112746d0193 | |
parent | 20c9d087d1d17716c120a3653e74323b6525c792 (diff) | |
download | efl-bd200cefc44cb8b03ef465791b4dfc6b6cec85be.tar.gz |
evas.canvas3d: fix wrong output in evas-3d-pick example
Summary:
Since that
https://git.enlightenment.org/core/efl.git/commit/?id=c850cc0d80b754be851576083eba27a72b58b9f2
we don't use scene object for recalculation pick coordinates.
@fix
Reviewers: cedric, Hermet, raster
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D3806
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
-rw-r--r-- | src/examples/evas/evas-3d-pick.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/examples/evas/evas-3d-pick.c b/src/examples/evas/evas-3d-pick.c index 21d4116df1..be45053a6f 100644 --- a/src/examples/evas/evas-3d-pick.c +++ b/src/examples/evas/evas-3d-pick.c @@ -81,35 +81,20 @@ _on_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info) { Evas_Event_Mouse_Down *ev = event_info; - Evas_Coord x, y, w, h; - Evas_Coord obj_x, obj_y; - int scene_w, scene_h; - Evas_Real scene_x, scene_y; Evas_Real s, t; Evas_Canvas3D_Node *n; Evas_Canvas3D_Mesh *m; Eina_Bool pick; - evas_object_geometry_get(obj, &x, &y, &w, &h); + pick = evas_canvas3d_scene_pick(scene, ev->canvas.x, ev->canvas.y, &n, &m, &s, &t); - obj_x = ev->canvas.x - x; - obj_y = ev->canvas.y - y; - - evas_canvas3d_scene_size_get(scene, &scene_w, &scene_h); - - scene_x = obj_x * scene_w / (Evas_Real)w; - scene_y = obj_y * scene_h / (Evas_Real)h; - - pick = evas_canvas3d_scene_pick(scene, scene_x, scene_y, &n, &m, &s, &t); if (pick) printf("Picked : "); else printf("Not picked : "); - printf("output(%d, %d) canvas(%d, %d) object(%d, %d) scene(%f, %f) texcoord(%f, %f) " + printf("output(%d, %d) canvas(%d, %d) texcoord(%f, %f) " "node(%p) mesh(%p)\n", ev->output.x, ev->output.y, ev->canvas.x, ev->canvas.y, - obj_x, obj_y, - scene_x, scene_y, s, t, n, m); } |