static EPhysics_Body *
_letter_body_circle_add(EPhysics_World *world, Evas_Object *image)
{
- EPhysics_Body *body = ephysics_body_circle_add(world);
+ EPhysics_Body *body = ephysics_body_cylinder_add(world);
_letter_body_setup_common(body, image);
}
else
{
- body = ephysics_body_circle_add(world);
+ body = ephysics_body_cylinder_add(world);
elm_object_disabled_set(bd->controls.hardness, EINA_TRUE);
}
evas_object_move(body_image, x, y);
evas_object_show(body_image);
- body = ephysics_body_circle_add(world);
+ body = ephysics_body_cylinder_add(world);
ephysics_body_evas_object_set(body, body_image, EINA_TRUE);
ephysics_body_mass_set(body, INITIAL_MASS);
ephysics_body_event_callback_add(body, EPHYSICS_CALLBACK_BODY_DEL,
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- fall_body = ephysics_body_circle_add(test_data->world);
+ fall_body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(fall_body, sphere, EINA_TRUE);
ephysics_body_restitution_set(fall_body, 0.95);
ephysics_body_friction_set(fall_body, 0.1);
camera_data->base.evas_objs = eina_list_append(camera_data->base.evas_objs,
sphere);
- fall_body = ephysics_body_circle_add(camera_data->base.world);
+ fall_body = ephysics_body_cylinder_add(camera_data->base.world);
ephysics_body_evas_object_set(fall_body, sphere, EINA_TRUE);
ephysics_body_restitution_set(fall_body, 0.2);
ephysics_body_friction_set(fall_body, 0.5);
camera_data->base.evas_objs = eina_list_append(camera_data->base.evas_objs,
sphere);
- fall_body = ephysics_body_circle_add(camera_data->base.world);
+ fall_body = ephysics_body_cylinder_add(camera_data->base.world);
ephysics_body_mass_set(fall_body, 3.7);
ephysics_body_evas_object_set(fall_body, sphere, EINA_TRUE);
ephysics_body_restitution_set(fall_body, 0.12);
track_data->base.evas_objs = eina_list_append(track_data->base.evas_objs,
sphere);
- body = ephysics_body_circle_add(track_data->base.world);
+ body = ephysics_body_cylinder_add(track_data->base.world);
ephysics_body_evas_object_set(body, sphere, EINA_TRUE);
ephysics_body_restitution_set(body, 0.95);
ephysics_body_friction_set(body, 1);
front = _obj_face_add(test_data, "coin0", x, y);
back = _obj_face_add(test_data, "coin1", x, y);
- coin = ephysics_body_circle_add(test_data->world);
+ coin = ephysics_body_cylinder_add(test_data->world);
ephysics_body_resize(coin, 1, 1, 1);
ephysics_body_face_evas_object_set(coin,
EPHYSICS_BODY_CYLINDER_FACE_MIDDLE_FRONT,
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- fall_body = ephysics_body_circle_add(test_data->world);
+ fall_body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(fall_body, sphere, EINA_TRUE);
ephysics_body_event_callback_add(fall_body,
EPHYSICS_CALLBACK_BODY_UPDATE,
collision_data->base.evas_objs = eina_list_append(
collision_data->base.evas_objs, sphere1);
- sphere_body1 = ephysics_body_circle_add(collision_data->base.world);
+ sphere_body1 = ephysics_body_cylinder_add(collision_data->base.world);
ephysics_body_evas_object_set(sphere_body1, sphere1, EINA_TRUE);
ephysics_body_event_callback_add(sphere_body1,
EPHYSICS_CALLBACK_BODY_UPDATE,
collision_data->base.evas_objs = eina_list_append(
collision_data->base.evas_objs, sphere2);
- sphere_body2 = ephysics_body_circle_add(collision_data->base.world);
+ sphere_body2 = ephysics_body_cylinder_add(collision_data->base.world);
ephysics_body_evas_object_set(sphere_body2, sphere2, EINA_TRUE);
ephysics_body_event_callback_add(sphere_body2,
EPHYSICS_CALLBACK_BODY_UPDATE,
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- fall_body = ephysics_body_circle_add(test_data->world);
+ fall_body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(fall_body, sphere, EINA_TRUE);
ephysics_body_restitution_set(fall_body, 0.95);
ephysics_body_friction_set(fall_body, 0.1);
speed_data->base.evas_objs = eina_list_append(speed_data->base.evas_objs,
sphere);
- ball = ephysics_body_circle_add(speed_data->base.world);
+ ball = ephysics_body_cylinder_add(speed_data->base.world);
ephysics_body_evas_object_set(ball, sphere, EINA_TRUE);
ephysics_body_restitution_set(ball, 0.8);
ephysics_body_friction_set(ball, 0.2);
collision_data->base.evas_objs = eina_list_append(
collision_data->base.evas_objs, sphere1);
- sphere_body1 = ephysics_body_circle_add(collision_data->base.world);
+ sphere_body1 = ephysics_body_cylinder_add(collision_data->base.world);
ephysics_body_evas_object_set(sphere_body1, sphere1, EINA_TRUE);
ephysics_body_event_callback_add(sphere_body1,
EPHYSICS_CALLBACK_BODY_UPDATE,
collision_data->base.evas_objs = eina_list_append(
collision_data->base.evas_objs, sphere2);
- sphere_body2 = ephysics_body_circle_add(collision_data->base.world);
+ sphere_body2 = ephysics_body_cylinder_add(collision_data->base.world);
ephysics_body_evas_object_set(sphere_body2, sphere2, EINA_TRUE);
ephysics_body_event_callback_add(sphere_body2,
EPHYSICS_CALLBACK_BODY_UPDATE,
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- sphere_body = ephysics_body_circle_add(test_data->world);
+ sphere_body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(sphere_body, sphere, EINA_TRUE);
ephysics_body_restitution_set(sphere_body, 0.5);
ephysics_body_central_impulse_apply(sphere_body, 300, 0, 0);
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- body = ephysics_body_circle_add(test_data->world);
+ body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_restitution_set(body, 0.85);
ephysics_body_evas_object_set(body, sphere, EINA_TRUE);
test_data->bodies = eina_list_append(test_data->bodies, body);
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- fall_body = ephysics_body_circle_add(test_data->world);
- ephysics_body_linear_movement_enable_set(fall_body, EINA_TRUE, EINA_TRUE, EINA_TRUE);
+ fall_body = ephysics_body_cylinder_add(test_data->world);
+ ephysics_body_linear_movement_enable_set(fall_body, EINA_TRUE, EINA_TRUE,
+ EINA_TRUE);
ephysics_body_evas_object_set(fall_body, sphere, EINA_TRUE);
ephysics_body_event_callback_add(fall_body, EPHYSICS_CALLBACK_BODY_UPDATE,
update_object_cb, shadow);
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- ball = ephysics_body_circle_add(test_data->world);
+ ball = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(ball, sphere, EINA_TRUE);
ephysics_body_restitution_set(ball, 0.95);
ephysics_body_friction_set(ball, 0.1);
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- fall_body = ephysics_body_circle_add(test_data->world);
+ fall_body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(fall_body, sphere, EINA_TRUE);
ephysics_body_event_callback_add(fall_body, EPHYSICS_CALLBACK_BODY_UPDATE,
update_object_cb, shadow);
evas_object_show(sphere1);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere1);
- sphere_body1 = ephysics_body_circle_add(test_data->world);
+ sphere_body1 = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(sphere_body1, sphere1, EINA_TRUE);
ephysics_body_event_callback_add(sphere_body1,
EPHYSICS_CALLBACK_BODY_UPDATE,
evas_object_show(sphere2);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere2);
- sphere_body2 = ephysics_body_circle_add(test_data->world);
+ sphere_body2 = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(sphere_body2, sphere2, EINA_TRUE);
ephysics_body_event_callback_add(sphere_body2,
EPHYSICS_CALLBACK_BODY_UPDATE,
evas_object_show(evas_obj);
test_data->evas_objs = eina_list_append(test_data->evas_objs, evas_obj);
- fall_body = ephysics_body_circle_add(test_data->world);
+ fall_body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_mass_set(fall_body, 2);
ephysics_body_evas_object_set(fall_body, evas_obj, EINA_TRUE);
ephysics_body_restitution_set(fall_body, 0.95);
velocity_data->base.evas_objs = eina_list_append(
velocity_data->base.evas_objs, sphere);
- sphere_body = ephysics_body_circle_add(velocity_data->base.world);
+ sphere_body = ephysics_body_cylinder_add(velocity_data->base.world);
ephysics_body_evas_object_set(sphere_body, sphere, EINA_TRUE);
ephysics_body_restitution_set(sphere_body, 0.8);
ephysics_body_friction_set(sphere_body, 1);
evas_object_show(sphere);
test_data->evas_objs = eina_list_append(test_data->evas_objs, sphere);
- sphere_body = ephysics_body_circle_add(test_data->world);
+ sphere_body = ephysics_body_cylinder_add(test_data->world);
ephysics_body_evas_object_set(sphere_body, sphere, EINA_TRUE);
ephysics_body_restitution_set(sphere_body, 1.0);
ephysics_body_event_callback_add(sphere_body, EPHYSICS_CALLBACK_BODY_UPDATE,
* @{
*
* Shapes are used to create bodies with shapes that differ from primitive
- * ones, like box and circle.
+ * ones, like box and cylinder.
*
* A shape consists in a group of points, the vertices of the body to be
* created later with @ref ephysics_body_shape_add().
* Body handle, represents an object on EPhysics world.
*
* Many types of bodies can be created:
- * @li @ref ephysics_body_circle_add()
+ * @li @ref ephysics_body_cylinder_add()
* @li @ref ephysics_body_box_add()
* @li @ref ephysics_body_shape_add()
* @li @ref ephysics_body_soft_circle_add()
*
* @note The list should be freed after usage.
*
- * @see ephysics_body_circle_add().
+ * @see ephysics_body_cylinder_add().
* @see ephysics_body_box_add().
* @see ephysics_body_del().
*
* A body is a representation of an object inside a physics world.
*
* Bodies can have different shapes that can be created with:
- * @li @ref ephysics_body_circle_add();
+ * @li @ref ephysics_body_cylinder_add();
* @li @ref ephysics_body_box_add();
* @li or @ref ephysics_body_shape_add().
*
/**
* @brief
- * Create a new circle physics body.
+ * Create a new cylinder physics body.
*
- * Its collision shape will be a circle of diameter 1. To change it's size
+ * Its collision shape will be a cylinder of diameter 1. To change it's size
* @ref ephysics_body_geometry_set() should be used.
*
* Any evas object can be associated to it with
* @ref ephysics_body_evas_object_set(),
- * and it will collide as a circle (even if you have an evas rectangle).
+ * and it will collide as a cylinder (even if you have an evas rectangle).
*
- * If a circle that could have its shape deformed is required, use
- * @ref ephysics_body_soft_box_add().
+ * If a cylinder that could have its shape deformed is required, use
+ * @ref ephysics_body_soft_circle_add().
*
* @param world The world this body will belongs to.
* @return a new body or @c NULL, on errors.
*
* @ingroup EPhysics_Body
*/
-EAPI EPhysics_Body *ephysics_body_circle_add(EPhysics_World *world);
+EAPI EPhysics_Body *ephysics_body_cylinder_add(EPhysics_World *world);
/**
* @brief
* @note When working with soft bodies it's importante to adjust the
* simulation's fixed time step due its multi point nature.
*
- * For a rigid circle, check @ref ephysics_body_circle_add().
+ * For a rigid cylinder, check @ref ephysics_body_cylinder_add().
*
* @param world The world this body will belongs to.
* @return a new body or @c NULL, on errors.
* @note When working with soft bodies it's importante to adjust the
* simulation's fixed time step due its multi point nature.
*
- * For a rigid circle, check @ref ephysics_body_circle_add().
+ * For a rigid cylinder, check @ref ephysics_body_cylinder_add().
*
* @param world The world this body will belong to.
* @return a new body or @c NULL on errors.
* @param body The body to be deleted.
*
* @see ephysics_body_box_add().
- * @see ephysics_body_circle_add().
+ * @see ephysics_body_cylinder_add().
*
* @ingroup EPhysics_Body
*/
*
* @see ephysics_body_box_add().
* @see ephysics_body_soft_box_add().
- * @see ephysics_body_circle_add().
+ * @see ephysics_body_cylinder_add().
* @see ephysics_body_soft_circle_add().
* @see ephysics_body_evas_object_unset().
* @see ephysics_world_rate_set().
* @brief
* Set physics body size.
*
- * By default circles have diameter equal to 1 meter * rate, boxes have
+ * By default cylinders have diameter equal to 1 meter * rate, boxes have
* dimensions 1 meter * rate on all the axes.
*
* There are three direct ways of modifying it's size:
* Set physics body geometry.
*
* All the physics bodies are created centered on origin (0, 0) and with
- * canonical dimensions. Circles have diameter 1, boxes have dimensions 1
+ * canonical dimensions. Cylinder have diameter 1, boxes have dimensions 1
* on all the axes.
*
* There are four direct ways of modifying this geometry:
* mass at x component = 20, y component = 10 and z = 10, it will return
* @p x = 0.666, @p y = 0.5 and @p z = 0.5.
*
- * For primitive shapes, like box and circle, the center of mass
+ * For primitive shapes, like box and cylinder, the center of mass
* is (0.5, 0.5, 0.5).
*
* This function can be useful when updating evas objects for bodies
}
EAPI EPhysics_Body *
-ephysics_body_circle_add(EPhysics_World *world)
+ephysics_body_cylinder_add(EPhysics_World *world)
{
btCollisionShape *collision_shape;
EPhysics_Body *body;
if (!world)
{
- ERR("Can't add circle, world is null.");
+ ERR("Can't add cylinder, world is null.");
return NULL;
}
}
ephysics_world_lock_take(world);
- body = _ephysics_body_rigid_body_add(world, collision_shape, "circle", 0.5,
+ body = _ephysics_body_rigid_body_add(world, collision_shape, "cylinder", 0.5,
0.5, 0.5);
body->shape = EPHYSICS_BODY_SHAPE_CYLINDER;
ephysics_world_lock_release(world);