EPhysics.h File Reference

These routines are used for EPhysics library interaction. More...

## Data Structures

struct | _EPhysics_Quaternion
| Quaternion coordinates and rotation (w, x, y, z). More...

## Macros

#define | EAPI
#define | EPHYSICS_VERSION_MAJOR EFL_VERSION_MAJOR
#define | EPHYSICS_VERSION_MINOR EFL_VERSION_MINOR
#define | EPHYSICS_BODY_MASS_STATIC (0.0)
| Mass amount used to makes a body static.
#define | EPHYSICS_BODY_DENSITY_WOOD (680.0)
| Density of wood in kg / m ^ 3.
#define | EPHYSICS_BODY_DENSITY_IRON (7400.0)
| Density of iron in kg / m ^ 3.
#define | EPHYSICS_BODY_DENSITY_CONCRETE (2300.0)
| Density of concrete in kg / m ^ 3.
#define | EPHYSICS_BODY_DENSITY_RUBBER (920.0)
| Density of rubber in kg / m ^ 3.
#define | EPHYSICS_BODY_DENSITY_POLYSTYRENE (80.0)
| Density of polystyrene in kg / m ^ 3.
#define | EPHYSICS_BODY_DENSITY_PLASTIC (1300.0)
| Density of plastic in kg / m ^ 3.
#define | EPHYSICS_BODY_FRICTION_WOOD (0.4)
| Friction coefficient of wood.
#define | EPHYSICS_BODY_FRICTION_IRON (0.8)
| Friction coefficient of iron.
#define | EPHYSICS_BODY_FRICTION_CONCRETE (0.65)
| Friction coefficient of concrete.
#define | EPHYSICS_BODY_FRICTION_RUBBER (0.75)
| Friction coefficient of rubber.
#define | EPHYSICS_BODY_FRICTION_POLYSTYRENE (0.5)
| Friction coefficient of polystyrene.
#define | EPHYSICS_BODY_FRICTION_PLASTIC (0.35)
| Friction coefficient of plastic.
#define | EPHYSICS_BODY_RESTITUTION_WOOD (0.7)
| Restitution coefficient of wood.
#define | EPHYSICS_BODY_RESTITUTION_IRON (0.85)
| Restitution coefficient of iron.
#define | EPHYSICS_BODY_RESTITUTION_CONCRETE (0.75)
| Restitution coefficient of concrete.
#define | EPHYSICS_BODY_RESTITUTION_RUBBER (0.3)
| Restitution coefficient of rubber.
#define | EPHYSICS_BODY_RESTITUTION_POLYSTYRENE (0.5)
| Restitution coefficient of polystyrene.
#define | EPHYSICS_BODY_RESTITUTION_PLASTIC (0.6)
| Restitution coefficient of plastic.
#define | EAPI

## Typedefs

typedef struct _EPhysics_Quaternion | EPhysics_Quaternion
| Quaternion handle, represents a quaternion to be used to rotate bodies.
typedef struct _EPhysics_Shape | EPhysics_Shape
| Shape handle, represents a shape to be used to create a body.
typedef struct _EPhysics_Body | EPhysics_Body
| Body handle, represents an object on EPhysics world.
typedef struct _EPhysics_Camera | EPhysics_Camera
| Camera handle, used to change the position of the frame to be rendered.
typedef struct _EPhysics_World | EPhysics_World
| World handle, most basic type of EPhysics.
typedef enum _EPhysics_Callback_World_Type | EPhysics_Callback_World_Type
| Identifier of callbacks to be set for EPhysics worlds.
typedef enum _EPhysics_World_Constraint_Solver_Mode | EPhysics_World_Solver_Mode
typedef void(* | EPhysics_World_Event_Cb) (void *data, EPhysics_World *world, void *event_info)
| EPhysics world event callback function signature.
typedef enum _EPhysics_Body_Cloth_Anchor_Side | EPhysics_Body_Cloth_Anchor_Side
| Identifier of cloth anchor sides.
typedef enum _EPhysics_Body_Face | EPhysics_Body_Face
| Define in which body's face the evas object should be set.
typedef struct _EPhysics_Body_Collision | EPhysics_Body_Collision
| Body collision wraps collision informations.
typedef enum _EPhysics_Callback_Body_Type | EPhysics_Callback_Body_Type
| The types of events triggering a callback.
typedef enum _EPhysics_Body_Material | EPhysics_Body_Material
| The types of materials to be set on a body.
typedef void(* | EPhysics_Body_Event_Cb) (void *data, EPhysics_Body *body, void *event_info)
| EPhysics body event callback function signature.
typedef struct _EPhysics_Constraint | EPhysics_Constraint
| Constraint handle, used to limit bodies movements.

## Enumerations

enum | _EPhysics_Callback_World_Type { EPHYSICS_CALLBACK_WORLD_DEL , EPHYSICS_CALLBACK_WORLD_STOPPED , EPHYSICS_CALLBACK_WORLD_CAMERA_MOVED , EPHYSICS_CALLBACK_WORLD_UPDATE , EPHYSICS_CALLBACK_WORLD_LAST }
enum | _EPhysics_World_Constraint_Solver_Mode { EPHYSICS_WORLD_SOLVER_RANDMIZE_ORDER = 1 , EPHYSICS_WORLD_SOLVER_USE_WARMSTARTING = 4 , EPHYSICS_WORLD_SOLVER_USE_2_FRICTION_DIRECTIONS = 16 , EPHYSICS_WORLD_SOLVER_SIMD = 256 }
| typedef EPhysics_World_Constraint_Solver_Mode More...
enum | _EPhysics_Body_Cloth_Anchor_Side { EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_LEFT , EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_RIGHT , EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_TOP , EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_BOTTOM , EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_LAST }

enum

_EPhysics_Body_Face {
EPHYSICS_BODY_BOX_FACE_MIDDLE_FRONT ,
EPHYSICS_BODY_BOX_FACE_MIDDLE_BACK ,
EPHYSICS_BODY_BOX_FACE_FRONT ,
EPHYSICS_BODY_BOX_FACE_BACK ,
EPHYSICS_BODY_BOX_FACE_LEFT ,
EPHYSICS_BODY_BOX_FACE_RIGHT ,
EPHYSICS_BODY_BOX_FACE_TOP ,
EPHYSICS_BODY_BOX_FACE_BOTTOM ,
EPHYSICS_BODY_CLOTH_FACE_FRONT ,
EPHYSICS_BODY_CLOTH_FACE_BACK ,
EPHYSICS_BODY_CYLINDER_FACE_MIDDLE_FRONT ,
EPHYSICS_BODY_CYLINDER_FACE_MIDDLE_BACK ,
EPHYSICS_BODY_CYLINDER_FACE_FRONT ,
EPHYSICS_BODY_CYLINDER_FACE_BACK ,
EPHYSICS_BODY_CYLINDER_FACE_CURVED ,
EPHYSICS_BODY_SPHERE_FACE_FRONT ,
EPHYSICS_BODY_SPHERE_FACE_BACK ,
EPHYSICS_BODY_FACE_LAST
}

enum | _EPhysics_Callback_Body_Type { EPHYSICS_CALLBACK_BODY_UPDATE , EPHYSICS_CALLBACK_BODY_COLLISION , EPHYSICS_CALLBACK_BODY_DEL , EPHYSICS_CALLBACK_BODY_STOPPED , EPHYSICS_CALLBACK_BODY_LAST }
enum | _EPhysics_Body_Material { EPHYSICS_BODY_MATERIAL_CUSTOM , EPHYSICS_BODY_MATERIAL_CONCRETE , EPHYSICS_BODY_MATERIAL_IRON , EPHYSICS_BODY_MATERIAL_PLASTIC , EPHYSICS_BODY_MATERIAL_POLYSTYRENE , EPHYSICS_BODY_MATERIAL_RUBBER , EPHYSICS_BODY_MATERIAL_WOOD , EPHYSICS_BODY_MATERIAL_LAST }

## Functions

EAPI int | ephysics_init (void)
| Initialize EPhysics.
EAPI int | ephysics_shutdown (void)
| Shutdown EPhysics.
EAPI EPhysics_Quaternion * | ephysics_quaternion_new (void)
| Create a new quaternion.
EAPI void | ephysics_quaternion_get (const EPhysics_Quaternion *quat, double *x, double *y, double *z, double *w)
| Get quaternion values.
EAPI void | ephysics_quaternion_axis_angle_get (const EPhysics_Quaternion *quat, double *nx, double *ny, double *nz, double *a)
| Get quaternion axis and angle.
EAPI void | ephysics_quaternion_set (EPhysics_Quaternion *quat, double x, double y, double z, double w)
| Set quaternion values.
EAPI void | ephysics_quaternion_axis_angle_set (EPhysics_Quaternion *quat, double nx, double ny, double nz, double a)
| Set quaternion using axis angle notation.
EAPI void | ephysics_quaternion_euler_set (EPhysics_Quaternion *quat, double yaw, double pitch, double roll)
| Set quaternion using Euler angles.
EAPI void | ephysics_quaternion_normalize (EPhysics_Quaternion *quat)
| Normalize the quaternion.
EAPI void | ephysics_quaternion_invert (EPhysics_Quaternion *quat)
| Invert the quaternion.
EAPI void | ephysics_quaternion_scale (EPhysics_Quaternion *quat, double scale)
| Scale the quaternion.
EAPI void | ephysics_quaternion_inverse_scale (EPhysics_Quaternion *quat, double scale)
| Inversely scale the quaternion.
EAPI EPhysics_Quaternion * | ephysics_quaternion_sum (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
| Returns a sum of two quaternions.
EAPI EPhysics_Quaternion * | ephysics_quaternion_diff (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
| Returns a difference between two quaternions.
EAPI EPhysics_Quaternion * | ephysics_quaternion_multiply (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
| Multiply two quaternions.
EAPI EPhysics_Quaternion * | ephysics_quaternion_slerp (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, double ratio, EPhysics_Quaternion *result)
| Return the quaternion which is the result of Spherical Linear Interpolation between two quaternions.
EAPI double | ephysics_quaternion_dot (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2)
| Return the dot product between two quaternions.
EAPI double | ephysics_quaternion_angle_get (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2)
| Return the angle between two quaternions.
EAPI double | ephysics_quaternion_length_get (const EPhysics_Quaternion *quat)
| Return the length of the quaternion.
EAPI double | ephysics_quaternion_length2_get (const EPhysics_Quaternion *quat)
| Return the length squared of the quaternion.
EAPI EPhysics_Shape * | ephysics_shape_new (void)
| Create a new shape.
EAPI void | ephysics_shape_del (EPhysics_Shape *shape)
| Delete a shape.
EAPI Eina_Bool | ephysics_shape_point_add (EPhysics_Shape *shape, double x, double y, double z)
| Add a new point to the shape.
EAPI EPhysics_Shape * | ephysics_shape_load (const char *filename)
| Load the shape from a file.
EAPI Eina_Bool | ephysics_shape_save (const EPhysics_Shape *shape, const char *filename)
| Save the shape to a file.
EAPI void | ephysics_camera_position_set (EPhysics_Camera *camera, Evas_Coord x, Evas_Coord y)
| Set camera's position.
EAPI void | ephysics_camera_position_get (const EPhysics_Camera *camera, Evas_Coord *x, Evas_Coord *y)
| Get camera's position.
EAPI void | ephysics_camera_body_track (EPhysics_Camera *camera, EPhysics_Body *body, Eina_Bool horizontal, Eina_Bool vertical)
| Set camera to track a body.
EAPI void | ephysics_camera_tracked_body_get (EPhysics_Camera *camera, EPhysics_Body **body, Eina_Bool *horizontal, Eina_Bool *vertical)
| Get body tracked by camera.
EAPI void | ephysics_camera_perspective_set (EPhysics_Camera *camera, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc)
| Set perspective to be applied on the scene.
EAPI void | ephysics_camera_perspective_get (const EPhysics_Camera *camera, Evas_Coord *px, Evas_Coord *py, Evas_Coord *z0, Evas_Coord *foc)
| Get perspective applied on the scene.
EAPI void | ephysics_camera_perspective_enabled_set (EPhysics_Camera *camera, Eina_Bool enabled)
| Set if perspective should be applied.
EAPI Eina_Bool | ephysics_camera_perspective_enabled_get (const EPhysics_Camera *camera)
| Return if perspective is enabled or not.
EAPI EPhysics_World * | ephysics_world_new (void)
| Create a new physics world.
EAPI void | ephysics_world_render_geometry_set (EPhysics_World *world, Evas_Coord x, Evas_Coord y, Evas_Coord z, Evas_Coord w, Evas_Coord h, Evas_Coord d)
| Set dimensions of rendered area to be take on account by default updates.
EAPI void | ephysics_world_render_geometry_get (const EPhysics_World *world, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z, Evas_Coord *w, Evas_Coord *h, Evas_Coord *d)
| Get dimensions of rendered area to be take on account by default updates.
EAPI Eina_Bool | ephysics_world_serialize (EPhysics_World *world, const char *path)
| Serializes the `world` to `path`.
EAPI void | ephysics_world_del (EPhysics_World *world)
| Deletes a physics world.
EAPI void | ephysics_world_running_set (EPhysics_World *world, Eina_Bool running)
| Set running status of world.
EAPI Eina_Bool | ephysics_world_running_get (const EPhysics_World *world)
| Get running status of world.
EAPI void | ephysics_world_max_sleeping_time_set (EPhysics_World *world, double sleeping_time)
| Set the max sleeping time value.
EAPI double | ephysics_world_max_sleeping_time_get (const EPhysics_World *world)
| Get the max sleeping time value for `world`.
EAPI void | ephysics_world_gravity_set (EPhysics_World *world, double gx, double gy, double gz)
| Set world gravity in the 3 axes (x, y, z).
EAPI void | ephysics_world_constraint_solver_iterations_set (EPhysics_World *world, int iterations)
| Set the number of iterations the constraint solver will have for contact and joint constraints.
EAPI int | ephysics_world_constraint_solver_iterations_get (const EPhysics_World *world)
| Get the number of iterations the constraint solver will have for contact and joint constraints.
EAPI void | ephysics_world_constraint_solver_mode_enable_set (EPhysics_World *world, EPhysics_World_Solver_Mode solver_mode, Eina_Bool enable)
| Enable or disable a constraint solver mode to `world`.
EAPI Eina_Bool | ephysics_world_constraint_solver_mode_enable_get (const EPhysics_World *world, EPhysics_World_Solver_Mode solver_mode)
| Get the `solver_mode` status on `world`.
EAPI void | ephysics_world_gravity_get (const EPhysics_World *world, double *gx, double *gy, double *gz)
| Get world gravity values for axis x, y and z.
EAPI void | ephysics_world_rate_set (EPhysics_World *world, double rate)
| Set rate between pixels on evas canvas and meters on ephysics world.
EAPI double | ephysics_world_rate_get (const EPhysics_World *world)
| Get rate between pixels on evas canvas and meters on ephysics world.
EAPI Eina_List * | ephysics_world_bodies_get (const EPhysics_World *world)
| Gets the world's bodies list.
EAPI EPhysics_Camera * | ephysics_world_camera_get (const EPhysics_World *world)
| Get the camera used by an ephysics world.
EAPI void | ephysics_world_event_callback_add (EPhysics_World *world, EPhysics_Callback_World_Type type, EPhysics_World_Event_Cb func, const void *data)
| Register a callback to a type of physics world event.
EAPI void * | ephysics_world_event_callback_del (EPhysics_World *world, EPhysics_Callback_World_Type type, EPhysics_World_Event_Cb func)
| Unregister an ephysics world event callback.
EAPI void * | ephysics_world_event_callback_del_full (EPhysics_World *world, EPhysics_Callback_World_Type type, EPhysics_World_Event_Cb func, void *data)
| Unregister an ephysics world event callback matching data pointer.
EAPI void | ephysics_world_linear_slop_set (EPhysics_World *world, double linear_slop)
| Set linear slop to be used by world.
EAPI double | ephysics_world_linear_slop_get (const EPhysics_World *world)
| Get linear slop used by world.
EAPI void | ephysics_world_bodies_outside_top_autodel_set (EPhysics_World *world, Eina_Bool autodel)
| Set world autodeleting bodies mode when they're outside of render area by the top.
EAPI Eina_Bool | ephysics_world_bodies_outside_top_autodel_get (const EPhysics_World *world)
| Get world autodeleting bodies mode when they're outside of render area by the top.
EAPI void | ephysics_world_bodies_outside_bottom_autodel_set (EPhysics_World *world, Eina_Bool autodel)
| Set world autodeleting bodies mode when they're outside of render area by the bottom.
EAPI Eina_Bool | ephysics_world_bodies_outside_bottom_autodel_get (const EPhysics_World *world)
| Get world autodeleting bodies mode when they're outside of render area by the bottom.
EAPI void | ephysics_world_bodies_outside_right_autodel_set (EPhysics_World *world, Eina_Bool autodel)
| Set world autodeleting bodies mode when they're outside of render area by the right.
EAPI Eina_Bool | ephysics_world_bodies_outside_right_autodel_get (const EPhysics_World *world)
| Get world autodeleting bodies mode when they're outside of render area by the right.
EAPI void | ephysics_world_bodies_outside_left_autodel_set (EPhysics_World *world, Eina_Bool autodel)
| Set world autodeleting bodies mode when they're outside of render area by the left.
EAPI Eina_Bool | ephysics_world_bodies_outside_left_autodel_get (const EPhysics_World *world)
| Get world autodeleting bodies mode when they're outside of render area by the left.
EAPI void | ephysics_world_bodies_outside_front_autodel_set (EPhysics_World *world, Eina_Bool autodel)
| Set world autodeleting bodies mode when they're outside of render area by the front.
EAPI Eina_Bool | ephysics_world_bodies_outside_front_autodel_get (const EPhysics_World *world)
| Get world autodeleting bodies mode when they're outside of render area by the front.
EAPI void | ephysics_world_bodies_outside_back_autodel_set (EPhysics_World *world, Eina_Bool autodel)
| Set world autodeleting bodies mode when they're outside of render area by the back.
EAPI Eina_Bool | ephysics_world_bodies_outside_back_autodel_get (const EPhysics_World *world)
| Get world autodeleting bodies mode when they're outside of render area by the back.
EAPI void | ephysics_world_simulation_set (EPhysics_World *world, double fixed_time_step, int max_sub_steps)
| Set world simulation's fixed time step and max number of sub steps configuration.
EAPI void | ephysics_world_simulation_get (const EPhysics_World *world, double *fixed_time_step, int *max_sub_steps)
| Get world simulation's fixed time step and max number of sub steps configuration.
EAPI void | ephysics_world_point_light_position_set (EPhysics_World *world, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz)
| Set position of point light to be applied on the scene.
EAPI void | ephysics_world_point_light_color_set (EPhysics_World *world, int lr, int lg, int lb)
| Set color of point light to be applied on the scene.
EAPI void | ephysics_world_ambient_light_color_set (EPhysics_World *world, int ar, int ag, int ab)
| Set color of the ambient light to be applied on the scene.
EAPI void | ephysics_world_point_light_position_get (const EPhysics_World *world, Evas_Coord *lx, Evas_Coord *ly, Evas_Coord *lz)
| Get position of point light applied on the scene.
EAPI void | ephysics_world_point_light_color_get (const EPhysics_World *world, int *lr, int *lg, int *lb)
| Get color of point light applied on the scene.
EAPI void | ephysics_world_ambient_light_color_get (const EPhysics_World *world, int *ar, int *ag, int *ab)
| Set color of the ambient light to be applied on the scene.
EAPI void | ephysics_world_light_all_bodies_set (EPhysics_World *world, Eina_Bool enable)
| Set if light should be applied over all the bodies.
EAPI Eina_Bool | ephysics_world_light_all_bodies_get (const EPhysics_World *world)
| Get light setting regarding being applied over all the bodies.
EAPI void | ephysics_world_stack_enable_set (EPhysics_World *world, Eina_Bool enabled)
| Enable / disable stacking based on bodies z coordinates.
EAPI Eina_Bool | ephysics_world_stack_enable_get (const EPhysics_World *world)
| Get stacking status of world.
EAPI void | ephysics_body_soft_body_hardness_set (EPhysics_Body *body, double hardness)
| Set the soft body hardness percentage.
EAPI double | ephysics_body_soft_body_hardness_get (const EPhysics_Body *body)
| Get the soft body hardness percentage.
EAPI void | ephysics_body_soft_body_anchor_hardness_set (EPhysics_Body *body, double hardness)
| Set the soft body anchor hardness percentage.
EAPI double | ephysics_body_soft_body_anchor_hardness_get (EPhysics_Body *body)
| Get the soft body anchor hardnees percentage.
EAPI void | ephysics_body_soft_body_drag_coefficient_set (EPhysics_Body *body, double coefficient)
| Set the drag coefficient of a soft body.
EAPI double | ephysics_body_soft_body_drag_coefficient_get (const EPhysics_Body *body)
| Get the drag coefficient of a soft body.
EAPI void | ephysics_body_soft_body_dragging_set (EPhysics_Body *body, int triangle)
| Set the soft body dragging status.
EAPI void | ephysics_body_soft_body_dragging_unset (EPhysics_Body *body)
| Unset the soft body dragging status.
EAPI int | ephysics_body_soft_body_triangle_index_get (EPhysics_Body *body, Evas_Coord x, Evas_Coord y)
| Get the triangle index of a soft body in `x` and `y`.
EAPI EPhysics_Body * | ephysics_body_soft_sphere_add (EPhysics_World *world, int granularity)
| Get the slice index of a soft body based on its slice`s Evas Object.
EAPI Eina_List * | ephysics_body_soft_body_triangles_inside_get (const EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas_Coord z, Evas_Coord w, Evas_Coord h, Evas_Coord d)
| Get a list of triangles indexes inside an area.
EAPI void | ephysics_body_soft_body_triangle_impulse_apply (EPhysics_Body *body, int idx, double x, double y, double z)
| Apply an impulse on a given soft body triangle.
EAPI void | ephysics_body_soft_body_triangle_list_impulse_apply (EPhysics_Body *body, Eina_List *triangles, double x, double y, double z)
| Apply impulse in a list of triangles.
EAPI void | ephysics_body_soft_body_position_iterations_set (EPhysics_Body *body, int iterations)
| Set the soft body number of position iterations.
EAPI int | ephysics_body_soft_body_position_iterations_get (EPhysics_Body *body)
| Get the soft body number of position iterations.
EAPI void | ephysics_body_soft_body_triangle_move (EPhysics_Body *body, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z)
| Move a body's triangle.
EAPI void | ephysics_body_soft_body_bending_constraints_add (EPhysics_Body *body, int number)
| Add new bending constraints to some `body`.
EAPI EPhysics_Body * | ephysics_body_cylinder_add (EPhysics_World *world)
| Create a new sphere physics body.
EAPI EPhysics_Body * | ephysics_body_soft_cylinder_add (EPhysics_World *world)
| Create a new deformable cylinder physics body.
EAPI EPhysics_Body * | ephysics_body_box_add (EPhysics_World *world)
| Create a new box physics body.
EAPI EPhysics_Body * | ephysics_body_soft_box_add (EPhysics_World *world)
| Create a new deformable box physics body.
EAPI EPhysics_Body * | ephysics_body_cloth_add (EPhysics_World *world, unsigned short rows, unsigned short columns)
| Create a new deformable cloth physics body.
EAPI void | ephysics_body_cloth_anchor_full_add (EPhysics_Body *body1, EPhysics_Body *body2, EPhysics_Body_Cloth_Anchor_Side side)
| Anchors a cloth with a rigid body.
EAPI void | ephysics_body_cloth_anchor_add (EPhysics_Body *body1, EPhysics_Body *body2, int node)
| Anchors an arbitrary cloth's node with a rigid body.
EAPI void | ephysics_body_cloth_anchor_del (EPhysics_Body *body)
| Removes the anchors in a cloth body.
EAPI EPhysics_Body * | ephysics_body_shape_add (EPhysics_World *world, EPhysics_Shape *shape)
| Create a new physics body using a custom shape.
EAPI EPhysics_Body * | ephysics_body_top_boundary_add (EPhysics_World *world)
| Create a physic top boundary.
EAPI EPhysics_Body * | ephysics_body_bottom_boundary_add (EPhysics_World *world)
| Create a physic bottom boundary.
EAPI EPhysics_Body * | ephysics_body_left_boundary_add (EPhysics_World *world)
| Create a physic left boundary.
EAPI EPhysics_Body * | ephysics_body_right_boundary_add (EPhysics_World *world)
| Create a physic right boundary.
EAPI EPhysics_Body * | ephysics_body_front_boundary_add (EPhysics_World *world)
| Create a physic front boundary.
EAPI EPhysics_Body * | ephysics_body_back_boundary_add (EPhysics_World *world)
| Create a physic back boundary.
EAPI void | ephysics_body_del (EPhysics_Body *body)
| Delete a physics body.
EAPI EPhysics_World * | ephysics_body_world_get (const EPhysics_Body *body)
| Get the world a body belongs to.
EAPI void | ephysics_body_evas_object_set (EPhysics_Body *body, Evas_Object *evas_obj, Eina_Bool use_obj_pos)
| Set an evas object to a physics body.
EAPI Evas_Object * | ephysics_body_evas_object_unset (EPhysics_Body *body)
| Unset the evas object associated to a physics body.
EAPI Evas_Object * | ephysics_body_evas_object_get (const EPhysics_Body *body)
| Get the evas object associated to a physics body.
EAPI void | ephysics_body_face_evas_object_set (EPhysics_Body *body, EPhysics_Body_Face face, Evas_Object *evas_obj, Eina_Bool use_obj_pos)
| Set an evas object to a physics body face.
EAPI Evas_Object * | ephysics_body_face_evas_object_get (const EPhysics_Body *body, EPhysics_Body_Face face)
| Get the evas object associated to a physics body face.
EAPI Evas_Object * | ephysics_body_face_evas_object_unset (EPhysics_Body *body, EPhysics_Body_Face face)
| Unset the evas object associated to a physics body face.
EAPI void | ephysics_body_resize (EPhysics_Body *body, Evas_Coord w, Evas_Coord h, Evas_Coord d)
| Set physics body size.
EAPI void | ephysics_body_move (EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas_Coord z)
| Set physics body position.
EAPI void | ephysics_body_geometry_set (EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas_Coord z, Evas_Coord w, Evas_Coord h, Evas_Coord d)
| Set physics body geometry.
EAPI void | ephysics_body_geometry_get (const EPhysics_Body *body, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z, Evas_Coord *w, Evas_Coord *h, Evas_Coord *d)
| Get physics body position.
EAPI void | ephysics_body_mass_set (EPhysics_Body *body, double mass)
| Set body's mass.
EAPI double | ephysics_body_mass_get (const EPhysics_Body *body)
| Get body's mass.
EAPI void | ephysics_body_linear_velocity_set (EPhysics_Body *body, double x, double y, double z)
| Set body's linear velocity on x, y and z axes.
EAPI void | ephysics_body_linear_velocity_get (const EPhysics_Body *body, double *x, double *y, double *z)
| Get body's linear velocity on x, y and z axes.
EAPI void | ephysics_body_angular_velocity_set (EPhysics_Body *body, double x, double y, double z)
| Set body's angular velocity on x, y and z axes.
EAPI void | ephysics_body_angular_velocity_get (const EPhysics_Body *body, double *x, double *y, double *z)
| Get body's angular velocity on x, y and z axes.
EAPI void | ephysics_body_sleeping_threshold_set (EPhysics_Body *body, double linear_threshold, double angular_threshold)
| Set the linear and angular sleeping threshold.
EAPI void | ephysics_body_sleeping_threshold_get (const EPhysics_Body *body, double *linear_threshold, double *angular_threshold)
| Get the linear sleeping threshold.
EAPI void | ephysics_body_stop (EPhysics_Body *body)
| Stop angular and linear body movement.
EAPI void | ephysics_body_damping_set (EPhysics_Body *body, double linear_damping, double angular_damping)
| Set the angular and linear damping values.
EAPI void | ephysics_body_damping_get (const EPhysics_Body *body, double *linear_damping, double *angular_damping)
| Get the angular and linear damping values.
EAPI Eina_Bool | ephysics_body_collision_group_add (EPhysics_Body *body, const char *group)
| Add a `body` to a given collision group.
EAPI Eina_Bool | ephysics_body_collision_group_del (EPhysics_Body *body, const char *group)
| Removes `body` from collision `group`.
EAPI const Eina_List * | ephysics_body_collision_group_list_get (const EPhysics_Body *body)
| Get the collision group list of `body`.
EAPI void | ephysics_body_evas_object_update (EPhysics_Body *body)
| Update the evas object associated to the body.
EAPI void | ephysics_body_event_callback_add (EPhysics_Body *body, EPhysics_Callback_Body_Type type, EPhysics_Body_Event_Cb func, const void *data)
| Register a callback to a type of physics body event.
EAPI void * | ephysics_body_event_callback_del (EPhysics_Body *body, EPhysics_Callback_Body_Type type, EPhysics_Body_Event_Cb func)
| Unregister an ephysics body event callback.
EAPI void * | ephysics_body_event_callback_del_full (EPhysics_Body *body, EPhysics_Callback_Body_Type type, EPhysics_Body_Event_Cb func, void *data)
| Unregister an ephysics body event callback matching data pointer.
EAPI void | ephysics_body_collision_position_get (const EPhysics_Body_Collision *collision, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z)
| Get the position(x, y) of a body's collision.
EAPI EPhysics_Body * | ephysics_body_collision_contact_body_get (const EPhysics_Body_Collision *collision)
| Get the body's collision contact body.
EAPI void | ephysics_body_restitution_set (EPhysics_Body *body, double restitution)
| Set body's coefficient of restitution.
EAPI double | ephysics_body_restitution_get (const EPhysics_Body *body)
| Get body's restitution.
EAPI void | ephysics_body_friction_set (EPhysics_Body *body, double friction)
| Set body's friction.
EAPI double | ephysics_body_friction_get (const EPhysics_Body *body)
| Get body's friction.
EAPI void | ephysics_body_central_impulse_apply (EPhysics_Body *body, double x, double y, double z)
| Apply an impulse on the center of a body.
EAPI void | ephysics_body_torque_impulse_apply (EPhysics_Body *body, double pitch, double yaw, double roll)
| Apply a torque impulse over a body.
EAPI void | ephysics_body_impulse_apply (EPhysics_Body *body, double x, double y, double z, Evas_Coord pos_x, Evas_Coord pos_y, Evas_Coord pos_z)
| Apply an impulse over a body.
EAPI void | ephysics_body_angular_movement_enable_set (EPhysics_Body *body, Eina_Bool enable_x, Eina_Bool enable_y, Eina_Bool enable_z)
| Enable or disable body's rotation on z axis.
EAPI void | ephysics_body_angular_movement_enable_get (const EPhysics_Body *body, Eina_Bool *enable_x, Eina_Bool *enable_y, Eina_Bool *enable_z)
| Return body's rotation on z axis state.
EAPI void | ephysics_body_linear_movement_enable_set (EPhysics_Body *body, Eina_Bool enable_x, Eina_Bool enable_y, Eina_Bool enable_z)
| Enable or disable body's movement on x, y and z axes.
EAPI void | ephysics_body_linear_movement_enable_get (const EPhysics_Body *body, Eina_Bool *enable_x, Eina_Bool *enable_y, Eina_Bool *enable_z)
| Get body's movement on x, y and z axes behavior.
EAPI EPhysics_Quaternion * | ephysics_body_rotation_get (const EPhysics_Body *body, EPhysics_Quaternion *rotation)
| Get body's rotation quaternion.
EAPI void | ephysics_body_rotation_set (EPhysics_Body *body, EPhysics_Quaternion *quat)
| Set body's rotation.
EAPI void | ephysics_body_data_set (EPhysics_Body *body, void *data)
| Set data to `body`.
EAPI void * | ephysics_body_data_get (const EPhysics_Body *body)
| Return data previously set to body.
EAPI void | ephysics_body_central_force_apply (EPhysics_Body *body, double x, double y, double z)
| Apply a force on the center of a body.
EAPI void | ephysics_body_torque_apply (EPhysics_Body *body, double torque_x, double torque_y, double torque_z)
| Apply a torque over a body.
EAPI void | ephysics_body_force_apply (EPhysics_Body *body, double x, double y, double z, Evas_Coord pos_x, Evas_Coord pos_y, Evas_Coord pos_z)
| Apply a force over a body.
EAPI void | ephysics_body_forces_get (const EPhysics_Body *body, double *x, double *y, double *z)
| Get physics body forces.
EAPI void | ephysics_body_torques_get (const EPhysics_Body *body, double *x, double *y, double *z)
| Get physics body torques.
EAPI void | ephysics_body_forces_clear (EPhysics_Body *body)
| Clear all the forces applied to a body.
EAPI void | ephysics_body_center_mass_get (const EPhysics_Body *body, double *x, double *y, double *z)
| Get the center of mass of physics body.
EAPI void | ephysics_body_density_set (EPhysics_Body *body, double density)
| Set body's material density.
EAPI double | ephysics_body_density_get (const EPhysics_Body *body)
| Get body's material density.
EAPI double | ephysics_body_volume_get (const EPhysics_Body *body)
| Get body's volume.
EAPI void | ephysics_body_material_set (EPhysics_Body *body, EPhysics_Body_Material material)
| Set body's material.
EAPI EPhysics_Body_Material | ephysics_body_material_get (const EPhysics_Body *body)
| Get body's material.
EAPI void | ephysics_body_light_set (EPhysics_Body *body, Eina_Bool enable)
| Set light effect over body.
EAPI Eina_Bool | ephysics_body_light_get (const EPhysics_Body *body)
| Get light effect over body.
EAPI void | ephysics_body_back_face_culling_set (EPhysics_Body *body, Eina_Bool enable)
| Set body's evas object to be hidden when it is counter-clockwise.
EAPI Eina_Bool | ephysics_body_back_face_culling_get (const EPhysics_Body *body)
| Return if body's evas object will be hidden when it is counter-clockwise or not.
EAPI Eina_Bool | ephysics_body_clockwise_get (const EPhysics_Body *body)
| Get the clockwise state of a body.
EAPI EPhysics_Constraint * | ephysics_constraint_linked_add (EPhysics_Body *body1, EPhysics_Body *body2)
| Create a new constraint between 2 bodies(Point to Point constraint).
EAPI void | ephysics_constraint_anchor_get (const EPhysics_Constraint *constraint, Evas_Coord *anchor_b1_x, Evas_Coord *anchor_b1_y, Evas_Coord *anchor_b1_z, Evas_Coord *anchor_b2_x, Evas_Coord *anchor_b2_y, Evas_Coord *anchor_b2_z)
| Change the constraints anchors values on both constrained bodies.
EAPI EPhysics_Constraint * | ephysics_constraint_add (EPhysics_Body *body)
| Create a new constraint.
EAPI void | ephysics_constraint_linear_limit_set (EPhysics_Constraint *constraint, Evas_Coord lower_x, Evas_Coord upper_x, Evas_Coord lower_y, Evas_Coord upper_y, Evas_Coord lower_z, Evas_Coord upper_z)
| Define the linear moving limits of a `constraint`.
EAPI void | ephysics_constraint_linear_limit_get (const EPhysics_Constraint *constraint, Evas_Coord *lower_x, Evas_Coord *upper_x, Evas_Coord *lower_y, Evas_Coord *upper_y, Evas_Coord *lower_z, Evas_Coord *upper_z)
| Get the linear moving limits of a `constraint`.
EAPI void | ephysics_constraint_angular_limit_set (EPhysics_Constraint *constraint, double counter_clock_x, double clock_wise_x, double counter_clock_y, double clock_wise_y, double counter_clock_z, double clock_wise_z)
| Set the angular moving limits of a `constraint`.
EAPI void | ephysics_constraint_angular_limit_get (const EPhysics_Constraint *constraint, double *counter_clock_x, double *clock_wise_x, double *counter_clock_y, double *clock_wise_y, double *counter_clock_z, double *clock_wise_z)
| Get the angular moving limits of a `constraint`.
EAPI void | ephysics_constraint_del (EPhysics_Constraint *constraint)
| Deletes a physics constraint.

## Detailed Description

These routines are used for EPhysics library interaction.