summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-08-22 20:05:02 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-08-22 20:05:02 +0000
commit5044cf3501cb31c873e1f4db2818012cf6dc757b (patch)
tree4c9a435e523bf1239ed64643405ba3c54717d678 /legacy
parenteec20918d032ffaa898b04e46d7a9edbd88466cb (diff)
EPhysics: remove a rigid ball and weird amount of mass
Let's see what was it masking and focus on making it works with defaults. SVN revision: 75568
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ephysics/src/bin/test_soft_body.c39
1 files changed, 6 insertions, 33 deletions
diff --git a/legacy/ephysics/src/bin/test_soft_body.c b/legacy/ephysics/src/bin/test_soft_body.c
index f4c48eae73..ef54d154f4 100644
--- a/legacy/ephysics/src/bin/test_soft_body.c
+++ b/legacy/ephysics/src/bin/test_soft_body.c
@@ -13,7 +13,7 @@ _world_populate(Test_Data *test_data)
13 shadow = elm_layout_add(test_data->win); 13 shadow = elm_layout_add(test_data->win);
14 elm_layout_file_set( 14 elm_layout_file_set(
15 shadow, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "shadow-ball"); 15 shadow, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "shadow-ball");
16 evas_object_move(shadow, WIDTH / 3, FLOOR_Y); 16 evas_object_move(shadow, 200, FLOOR_Y);
17 evas_object_resize(shadow, 70, 3); 17 evas_object_resize(shadow, 70, 3);
18 evas_object_show(shadow); 18 evas_object_show(shadow);
19 test_data->evas_objs = eina_list_append(test_data->evas_objs, shadow); 19 test_data->evas_objs = eina_list_append(test_data->evas_objs, shadow);
@@ -21,38 +21,13 @@ _world_populate(Test_Data *test_data)
21 evas_obj = elm_image_add(test_data->win); 21 evas_obj = elm_image_add(test_data->win);
22 elm_image_file_set(evas_obj, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", 22 elm_image_file_set(evas_obj, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj",
23 "big-red-ball"); 23 "big-red-ball");
24 evas_object_move(evas_obj, WIDTH / 3, HEIGHT / 2); 24 evas_object_move(evas_obj, 200, 200);
25 evas_object_resize(evas_obj, 70, 70);
26 evas_object_show(evas_obj);
27 test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj);
28
29 fall_body = ephysics_body_soft_circle_add(test_data->world);
30 ephysics_body_evas_object_set(fall_body, evas_obj, EINA_TRUE);
31 ephysics_body_restitution_set(fall_body, 0.95);
32 ephysics_body_friction_set(fall_body, 0.1);
33 ephysics_body_event_callback_add(fall_body, EPHYSICS_CALLBACK_BODY_UPDATE,
34 update_object_cb, shadow);
35 test_data->bodies = eina_list_append(test_data->bodies, fall_body);
36
37 shadow = elm_layout_add(test_data->win);
38 elm_layout_file_set(
39 shadow, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "shadow-ball");
40 evas_object_move(shadow, WIDTH / 3, FLOOR_Y);
41 evas_object_resize(shadow, 70, 3);
42 evas_object_show(shadow);
43 test_data->evas_objs = eina_list_append(test_data->evas_objs, shadow);
44
45 evas_obj = elm_image_add(test_data->win);
46 elm_image_file_set(evas_obj, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj",
47 "big-blue-ball");
48 evas_object_move(evas_obj, WIDTH / 3, HEIGHT / 4);
49 evas_object_resize(evas_obj, 70, 70); 25 evas_object_resize(evas_obj, 70, 70);
50 evas_object_show(evas_obj); 26 evas_object_show(evas_obj);
51 test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj); 27 test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj);
52 28
53 fall_body = ephysics_body_circle_add(test_data->world); 29 fall_body = ephysics_body_circle_add(test_data->world);
54 ephysics_body_evas_object_set(fall_body, evas_obj, EINA_TRUE); 30 ephysics_body_evas_object_set(fall_body, evas_obj, EINA_TRUE);
55 ephysics_body_mass_set(fall_body, 1200);
56 ephysics_body_restitution_set(fall_body, 0.95); 31 ephysics_body_restitution_set(fall_body, 0.95);
57 ephysics_body_friction_set(fall_body, 0.1); 32 ephysics_body_friction_set(fall_body, 0.1);
58 ephysics_body_event_callback_add(fall_body, EPHYSICS_CALLBACK_BODY_UPDATE, 33 ephysics_body_event_callback_add(fall_body, EPHYSICS_CALLBACK_BODY_UPDATE,
@@ -62,7 +37,7 @@ _world_populate(Test_Data *test_data)
62 shadow = elm_layout_add(test_data->win); 37 shadow = elm_layout_add(test_data->win);
63 elm_layout_file_set( 38 elm_layout_file_set(
64 shadow, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "shadow-ball"); 39 shadow, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "shadow-ball");
65 evas_object_move(shadow, WIDTH / 4, FLOOR_Y); 40 evas_object_move(shadow, 100, FLOOR_Y);
66 evas_object_resize(shadow, 70, 3); 41 evas_object_resize(shadow, 70, 3);
67 evas_object_show(shadow); 42 evas_object_show(shadow);
68 test_data->evas_objs = eina_list_append(test_data->evas_objs, shadow); 43 test_data->evas_objs = eina_list_append(test_data->evas_objs, shadow);
@@ -70,17 +45,15 @@ _world_populate(Test_Data *test_data)
70 evas_obj = elm_image_add(test_data->win); 45 evas_obj = elm_image_add(test_data->win);
71 elm_image_file_set(evas_obj, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", 46 elm_image_file_set(evas_obj, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj",
72 "big-blue-ball"); 47 "big-blue-ball");
73 evas_object_move(evas_obj, WIDTH / 4, HEIGHT / 4); 48 evas_object_move(evas_obj, 100, 100);
74 evas_object_resize(evas_obj, 70, 70); 49 evas_object_resize(evas_obj, 70, 70);
75 evas_object_show(evas_obj); 50 evas_object_show(evas_obj);
76 test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj); 51 test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj);
77 52
78 fall_body = ephysics_body_circle_add(test_data->world); 53 fall_body = ephysics_body_circle_add(test_data->world);
79 ephysics_body_evas_object_set(fall_body, evas_obj, EINA_TRUE); 54 ephysics_body_evas_object_set(fall_body, evas_obj, EINA_TRUE);
80 ephysics_body_mass_set(fall_body, 600);
81 ephysics_body_restitution_set(fall_body, 0.95); 55 ephysics_body_restitution_set(fall_body, 0.95);
82 ephysics_body_friction_set(fall_body, 0.1); 56 ephysics_body_friction_set(fall_body, 0.1);
83 ephysics_body_central_impulse_apply(fall_body, 500, 150);
84 ephysics_body_event_callback_add(fall_body, EPHYSICS_CALLBACK_BODY_UPDATE, 57 ephysics_body_event_callback_add(fall_body, EPHYSICS_CALLBACK_BODY_UPDATE,
85 update_object_cb, shadow); 58 update_object_cb, shadow);
86 test_data->bodies = eina_list_append(test_data->bodies, fall_body); 59 test_data->bodies = eina_list_append(test_data->bodies, fall_body);
@@ -88,7 +61,7 @@ _world_populate(Test_Data *test_data)
88 shadow = elm_layout_add(test_data->win); 61 shadow = elm_layout_add(test_data->win);
89 elm_layout_file_set( 62 elm_layout_file_set(
90 shadow, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "shadow-cube"); 63 shadow, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "shadow-cube");
91 evas_object_move(shadow, WIDTH / 6 + 60, FLOOR_Y); 64 evas_object_move(shadow, 100, FLOOR_Y);
92 evas_object_resize(shadow, 70, 3); 65 evas_object_resize(shadow, 70, 3);
93 evas_object_show(shadow); 66 evas_object_show(shadow);
94 test_data->evas_objs = eina_list_append(test_data->evas_objs, shadow); 67 test_data->evas_objs = eina_list_append(test_data->evas_objs, shadow);
@@ -96,7 +69,7 @@ _world_populate(Test_Data *test_data)
96 evas_obj = elm_image_add(test_data->win); 69 evas_obj = elm_image_add(test_data->win);
97 elm_image_file_set( 70 elm_image_file_set(
98 evas_obj, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "purple-cube"); 71 evas_obj, PACKAGE_DATA_DIR "/" EPHYSICS_TEST_THEME ".edj", "purple-cube");
99 evas_object_move(evas_obj, WIDTH / 6 + 60, HEIGHT / 8); 72 evas_object_move(evas_obj, 100, 220);
100 evas_object_resize(evas_obj, 70, 70); 73 evas_object_resize(evas_obj, 70, 70);
101 evas_object_show(evas_obj); 74 evas_object_show(evas_obj);
102 test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj); 75 test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj);