Data Structures | Macros | Typedefs | Enumerations | Functions
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. More...
 
#define EPHYSICS_BODY_DENSITY_WOOD   (680.0)
 Density of wood in kg / m ^ 3. More...
 
#define EPHYSICS_BODY_DENSITY_IRON   (7400.0)
 Density of iron in kg / m ^ 3. More...
 
#define EPHYSICS_BODY_DENSITY_CONCRETE   (2300.0)
 Density of concrete in kg / m ^ 3. More...
 
#define EPHYSICS_BODY_DENSITY_RUBBER   (920.0)
 Density of rubber in kg / m ^ 3. More...
 
#define EPHYSICS_BODY_DENSITY_POLYSTYRENE   (80.0)
 Density of polystyrene in kg / m ^ 3. More...
 
#define EPHYSICS_BODY_DENSITY_PLASTIC   (1300.0)
 Density of plastic in kg / m ^ 3. More...
 
#define EPHYSICS_BODY_FRICTION_WOOD   (0.4)
 Friction coefficient of wood. More...
 
#define EPHYSICS_BODY_FRICTION_IRON   (0.8)
 Friction coefficient of iron. More...
 
#define EPHYSICS_BODY_FRICTION_CONCRETE   (0.65)
 Friction coefficient of concrete. More...
 
#define EPHYSICS_BODY_FRICTION_RUBBER   (0.75)
 Friction coefficient of rubber. More...
 
#define EPHYSICS_BODY_FRICTION_POLYSTYRENE   (0.5)
 Friction coefficient of polystyrene. More...
 
#define EPHYSICS_BODY_FRICTION_PLASTIC   (0.35)
 Friction coefficient of plastic. More...
 
#define EPHYSICS_BODY_RESTITUTION_WOOD   (0.7)
 Restitution coefficient of wood. More...
 
#define EPHYSICS_BODY_RESTITUTION_IRON   (0.85)
 Restitution coefficient of iron. More...
 
#define EPHYSICS_BODY_RESTITUTION_CONCRETE   (0.75)
 Restitution coefficient of concrete. More...
 
#define EPHYSICS_BODY_RESTITUTION_RUBBER   (0.3)
 Restitution coefficient of rubber. More...
 
#define EPHYSICS_BODY_RESTITUTION_POLYSTYRENE   (0.5)
 Restitution coefficient of polystyrene. More...
 
#define EPHYSICS_BODY_RESTITUTION_PLASTIC   (0.6)
 Restitution coefficient of plastic. More...
 
#define EAPI
 

Typedefs

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

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. More...
 
EAPI int ephysics_shutdown (void)
 Shutdown EPhysics. More...
 
EAPI EPhysics_Quaternionephysics_quaternion_new (void)
 Create a new quaternion. More...
 
EAPI void ephysics_quaternion_get (const EPhysics_Quaternion *quat, double *x, double *y, double *z, double *w)
 Get quaternion values. More...
 
EAPI void ephysics_quaternion_axis_angle_get (const EPhysics_Quaternion *quat, double *nx, double *ny, double *nz, double *a)
 Get quaternion axis and angle. More...
 
EAPI void ephysics_quaternion_set (EPhysics_Quaternion *quat, double x, double y, double z, double w)
 Set quaternion values. More...
 
EAPI void ephysics_quaternion_axis_angle_set (EPhysics_Quaternion *quat, double nx, double ny, double nz, double a)
 Set quaternion using axis angle notation. More...
 
EAPI void ephysics_quaternion_euler_set (EPhysics_Quaternion *quat, double yaw, double pitch, double roll)
 Set quaternion using Euler angles. More...
 
EAPI void ephysics_quaternion_normalize (EPhysics_Quaternion *quat)
 Normalize the quaternion. More...
 
EAPI void ephysics_quaternion_invert (EPhysics_Quaternion *quat)
 Invert the quaternion. More...
 
EAPI void ephysics_quaternion_scale (EPhysics_Quaternion *quat, double scale)
 Scale the quaternion. More...
 
EAPI void ephysics_quaternion_inverse_scale (EPhysics_Quaternion *quat, double scale)
 Inversely scale the quaternion. More...
 
EAPI EPhysics_Quaternionephysics_quaternion_sum (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
 Returns a sum of two quaternions. More...
 
EAPI EPhysics_Quaternionephysics_quaternion_diff (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
 Returns a difference between two quaternions. More...
 
EAPI EPhysics_Quaternionephysics_quaternion_multiply (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
 Multiply two quaternions. More...
 
EAPI EPhysics_Quaternionephysics_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. More...
 
EAPI double ephysics_quaternion_dot (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2)
 Return the dot product between two quaternions. More...
 
EAPI double ephysics_quaternion_angle_get (const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2)
 Return the angle between two quaternions. More...
 
EAPI double ephysics_quaternion_length_get (const EPhysics_Quaternion *quat)
 Return the length of the quaternion. More...
 
EAPI double ephysics_quaternion_length2_get (const EPhysics_Quaternion *quat)
 Return the length squared of the quaternion. More...
 
EAPI EPhysics_Shapeephysics_shape_new (void)
 Create a new shape. More...
 
EAPI void ephysics_shape_del (EPhysics_Shape *shape)
 Delete a shape. More...
 
EAPI Eina_Bool ephysics_shape_point_add (EPhysics_Shape *shape, double x, double y, double z)
 Add a new point to the shape. More...
 
EAPI EPhysics_Shapeephysics_shape_load (const char *filename)
 Load the shape from a file. More...
 
EAPI Eina_Bool ephysics_shape_save (const EPhysics_Shape *shape, const char *filename)
 Save the shape to a file. More...
 
EAPI void ephysics_camera_position_set (EPhysics_Camera *camera, Evas_Coord x, Evas_Coord y)
 Set camera's position. More...
 
EAPI void ephysics_camera_position_get (const EPhysics_Camera *camera, Evas_Coord *x, Evas_Coord *y)
 Get camera's position. More...
 
EAPI void ephysics_camera_body_track (EPhysics_Camera *camera, EPhysics_Body *body, Eina_Bool horizontal, Eina_Bool vertical)
 Set camera to track a body. More...
 
EAPI void ephysics_camera_tracked_body_get (EPhysics_Camera *camera, EPhysics_Body **body, Eina_Bool *horizontal, Eina_Bool *vertical)
 Get body tracked by camera. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_camera_perspective_enabled_set (EPhysics_Camera *camera, Eina_Bool enabled)
 Set if perspective should be applied. More...
 
EAPI Eina_Bool ephysics_camera_perspective_enabled_get (const EPhysics_Camera *camera)
 Return if perspective is enabled or not. More...
 
EAPI EPhysics_Worldephysics_world_new (void)
 Create a new physics world. More...
 
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. More...
 
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. More...
 
EAPI Eina_Bool ephysics_world_serialize (EPhysics_World *world, const char *path)
 Serializes the world to path. More...
 
EAPI void ephysics_world_del (EPhysics_World *world)
 Deletes a physics world. More...
 
EAPI void ephysics_world_running_set (EPhysics_World *world, Eina_Bool running)
 Set running status of world. More...
 
EAPI Eina_Bool ephysics_world_running_get (const EPhysics_World *world)
 Get running status of world. More...
 
EAPI void ephysics_world_max_sleeping_time_set (EPhysics_World *world, double sleeping_time)
 Set the max sleeping time value. More...
 
EAPI double ephysics_world_max_sleeping_time_get (const EPhysics_World *world)
 Get the max sleeping time value for world. More...
 
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). More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_world_rate_set (EPhysics_World *world, double rate)
 Set rate between pixels on evas canvas and meters on ephysics world. More...
 
EAPI double ephysics_world_rate_get (const EPhysics_World *world)
 Get rate between pixels on evas canvas and meters on ephysics world. More...
 
EAPI Eina_Listephysics_world_bodies_get (const EPhysics_World *world)
 Gets the world's bodies list. More...
 
EAPI EPhysics_Cameraephysics_world_camera_get (const EPhysics_World *world)
 Get the camera used by an ephysics world. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_world_linear_slop_set (EPhysics_World *world, double linear_slop)
 Set linear slop to be used by world. More...
 
EAPI double ephysics_world_linear_slop_get (const EPhysics_World *world)
 Get linear slop used by world. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_world_light_all_bodies_set (EPhysics_World *world, Eina_Bool enable)
 Set if light should be applied over all the bodies. More...
 
EAPI Eina_Bool ephysics_world_light_all_bodies_get (const EPhysics_World *world)
 Get light setting regarding being applied over all the bodies. More...
 
EAPI void ephysics_world_stack_enable_set (EPhysics_World *world, Eina_Bool enabled)
 Enable / disable stacking based on bodies z coordinates. More...
 
EAPI Eina_Bool ephysics_world_stack_enable_get (const EPhysics_World *world)
 Get stacking status of world. More...
 
EAPI void ephysics_body_soft_body_hardness_set (EPhysics_Body *body, double hardness)
 Set the soft body hardness percentage. More...
 
EAPI double ephysics_body_soft_body_hardness_get (const EPhysics_Body *body)
 Get the soft body hardness percentage. More...
 
EAPI void ephysics_body_soft_body_anchor_hardness_set (EPhysics_Body *body, double hardness)
 Set the soft body anchor hardness percentage. More...
 
EAPI double ephysics_body_soft_body_anchor_hardness_get (EPhysics_Body *body)
 Get the soft body anchor hardnees percentage. More...
 
EAPI void ephysics_body_soft_body_drag_coefficient_set (EPhysics_Body *body, double coefficient)
 Set the drag coefficient of a soft body. More...
 
EAPI double ephysics_body_soft_body_drag_coefficient_get (const EPhysics_Body *body)
 Get the drag coefficient of a soft body. More...
 
EAPI void ephysics_body_soft_body_dragging_set (EPhysics_Body *body, int triangle)
 Set the soft body dragging status. More...
 
EAPI void ephysics_body_soft_body_dragging_unset (EPhysics_Body *body)
 Unset the soft body dragging status. More...
 
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. More...
 
EAPI int ephysics_body_soft_body_slice_index_get (EPhysics_Body *body, Evas_Object *slice)
 Get the slice index of a soft body based on its slice`s Evas Object. More...
 
EAPI EPhysics_Bodyephysics_body_soft_sphere_add (EPhysics_World *world, int granularity)
 Add a soft sphere. More...
 
EAPI Eina_Listephysics_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. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_body_soft_body_position_iterations_set (EPhysics_Body *body, int iterations)
 Set the soft body number of position iterations. More...
 
EAPI int ephysics_body_soft_body_position_iterations_get (EPhysics_Body *body)
 Get the soft body number of position iterations. More...
 
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. More...
 
EAPI void ephysics_body_soft_body_bending_constraints_add (EPhysics_Body *body, int number)
 Add new bending constraints to some body. More...
 
EAPI EPhysics_Bodyephysics_body_sphere_add (EPhysics_World *world)
 Create a new sphere physics body. More...
 
EAPI EPhysics_Bodyephysics_body_cylinder_add (EPhysics_World *world)
 Create a new cylinder physics body. More...
 
EAPI EPhysics_Bodyephysics_body_soft_cylinder_add (EPhysics_World *world)
 Create a new deformable cylinder physics body. More...
 
EAPI EPhysics_Bodyephysics_body_box_add (EPhysics_World *world)
 Create a new box physics body. More...
 
EAPI EPhysics_Bodyephysics_body_soft_box_add (EPhysics_World *world)
 Create a new deformable box physics body. More...
 
EAPI EPhysics_Bodyephysics_body_cloth_add (EPhysics_World *world, unsigned short rows, unsigned short columns)
 Create a new deformable cloth physics body. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_body_cloth_anchor_del (EPhysics_Body *body)
 Removes the anchors in a cloth body. More...
 
EAPI EPhysics_Bodyephysics_body_shape_add (EPhysics_World *world, EPhysics_Shape *shape)
 Create a new physics body using a custom shape. More...
 
EAPI EPhysics_Bodyephysics_body_top_boundary_add (EPhysics_World *world)
 Create a physic top boundary. More...
 
EAPI EPhysics_Bodyephysics_body_bottom_boundary_add (EPhysics_World *world)
 Create a physic bottom boundary. More...
 
EAPI EPhysics_Bodyephysics_body_left_boundary_add (EPhysics_World *world)
 Create a physic left boundary. More...
 
EAPI EPhysics_Bodyephysics_body_right_boundary_add (EPhysics_World *world)
 Create a physic right boundary. More...
 
EAPI EPhysics_Bodyephysics_body_front_boundary_add (EPhysics_World *world)
 Create a physic front boundary. More...
 
EAPI EPhysics_Bodyephysics_body_back_boundary_add (EPhysics_World *world)
 Create a physic back boundary. More...
 
EAPI void ephysics_body_del (EPhysics_Body *body)
 Delete a physics body. More...
 
EAPI EPhysics_Worldephysics_body_world_get (const EPhysics_Body *body)
 Get the world a body belongs to. More...
 
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. More...
 
EAPI Evas_Objectephysics_body_evas_object_unset (EPhysics_Body *body)
 Unset the evas object associated to a physics body. More...
 
EAPI Evas_Objectephysics_body_evas_object_get (const EPhysics_Body *body)
 Get the evas object associated to a physics body. More...
 
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. More...
 
EAPI Evas_Objectephysics_body_face_evas_object_get (const EPhysics_Body *body, EPhysics_Body_Face face)
 Get the evas object associated to a physics body face. More...
 
EAPI Evas_Objectephysics_body_face_evas_object_unset (EPhysics_Body *body, EPhysics_Body_Face face)
 Unset the evas object associated to a physics body face. More...
 
EAPI void ephysics_body_resize (EPhysics_Body *body, Evas_Coord w, Evas_Coord h, Evas_Coord d)
 Set physics body size. More...
 
EAPI void ephysics_body_move (EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas_Coord z)
 Set physics body position. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_body_mass_set (EPhysics_Body *body, double mass)
 Set body's mass. More...
 
EAPI double ephysics_body_mass_get (const EPhysics_Body *body)
 Get body's mass. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_body_sleeping_threshold_set (EPhysics_Body *body, double linear_threshold, double angular_threshold)
 Set the linear and angular sleeping threshold. More...
 
EAPI void ephysics_body_sleeping_threshold_get (const EPhysics_Body *body, double *linear_threshold, double *angular_threshold)
 Get the linear sleeping threshold. More...
 
EAPI void ephysics_body_stop (EPhysics_Body *body)
 Stop angular and linear body movement. More...
 
EAPI void ephysics_body_damping_set (EPhysics_Body *body, double linear_damping, double angular_damping)
 Set the angular and linear damping values. More...
 
EAPI void ephysics_body_damping_get (const EPhysics_Body *body, double *linear_damping, double *angular_damping)
 Get the angular and linear damping values. More...
 
EAPI Eina_Bool ephysics_body_collision_group_add (EPhysics_Body *body, const char *group)
 Add a body to a given collision group. More...
 
EAPI Eina_Bool ephysics_body_collision_group_del (EPhysics_Body *body, const char *group)
 Removes body from collision group. More...
 
EAPI const Eina_Listephysics_body_collision_group_list_get (const EPhysics_Body *body)
 Get the collision group list of body. More...
 
EAPI void ephysics_body_evas_object_update (EPhysics_Body *body)
 Update the evas object associated to the body. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI EPhysics_Bodyephysics_body_collision_contact_body_get (const EPhysics_Body_Collision *collision)
 Get the body's collision contact body. More...
 
EAPI void ephysics_body_restitution_set (EPhysics_Body *body, double restitution)
 Set body's coefficient of restitution. More...
 
EAPI double ephysics_body_restitution_get (const EPhysics_Body *body)
 Get body's restitution. More...
 
EAPI void ephysics_body_friction_set (EPhysics_Body *body, double friction)
 Set body's friction. More...
 
EAPI double ephysics_body_friction_get (const EPhysics_Body *body)
 Get body's friction. More...
 
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. More...
 
EAPI void ephysics_body_torque_impulse_apply (EPhysics_Body *body, double pitch, double yaw, double roll)
 Apply a torque impulse over a body. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI EPhysics_Quaternionephysics_body_rotation_get (const EPhysics_Body *body, EPhysics_Quaternion *rotation)
 Get body's rotation quaternion. More...
 
EAPI void ephysics_body_rotation_set (EPhysics_Body *body, EPhysics_Quaternion *quat)
 Set body's rotation. More...
 
EAPI void ephysics_body_data_set (EPhysics_Body *body, void *data)
 Set data to body. More...
 
EAPI void * ephysics_body_data_get (const EPhysics_Body *body)
 Return data previously set to body. More...
 
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. More...
 
EAPI void ephysics_body_torque_apply (EPhysics_Body *body, double torque_x, double torque_y, double torque_z)
 Apply a torque over a body. More...
 
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. More...
 
EAPI void ephysics_body_forces_get (const EPhysics_Body *body, double *x, double *y, double *z)
 Get physics body forces. More...
 
EAPI void ephysics_body_torques_get (const EPhysics_Body *body, double *x, double *y, double *z)
 Get physics body torques. More...
 
EAPI void ephysics_body_forces_clear (EPhysics_Body *body)
 Clear all the forces applied to a body. More...
 
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. More...
 
EAPI void ephysics_body_density_set (EPhysics_Body *body, double density)
 Set body's material density. More...
 
EAPI double ephysics_body_density_get (const EPhysics_Body *body)
 Get body's material density. More...
 
EAPI double ephysics_body_volume_get (const EPhysics_Body *body)
 Get body's volume. More...
 
EAPI void ephysics_body_material_set (EPhysics_Body *body, EPhysics_Body_Material material)
 Set body's material. More...
 
EAPI EPhysics_Body_Material ephysics_body_material_get (const EPhysics_Body *body)
 Get body's material. More...
 
EAPI void ephysics_body_light_set (EPhysics_Body *body, Eina_Bool enable)
 Set light effect over body. More...
 
EAPI Eina_Bool ephysics_body_light_get (const EPhysics_Body *body)
 Get light effect over body. More...
 
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. More...
 
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. More...
 
EAPI Eina_Bool ephysics_body_clockwise_get (const EPhysics_Body *body)
 Get the clockwise state of a body. More...
 
EAPI EPhysics_Constraintephysics_constraint_linked_add (EPhysics_Body *body1, EPhysics_Body *body2)
 Create a new constraint between 2 bodies(Point to Point constraint). More...
 
EAPI void ephysics_constraint_anchor_set (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. More...
 
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)
 Get the constraints anchors values on both constrained bodies. More...
 
EAPI EPhysics_Constraintephysics_constraint_add (EPhysics_Body *body)
 Create a new constraint. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI void ephysics_constraint_del (EPhysics_Constraint *constraint)
 Deletes a physics constraint. More...
 

Detailed Description

These routines are used for EPhysics library interaction.