forked from enlightenment/efl
ephysics: Rename EAPI macro to EPHYSICS_API in Ephysics library
Patch from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass ```__attribute__ ((visibility ("default")))``` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as ```__atttribute__((visibility("default")))```. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why EAPI is the only solution that worked for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
This commit is contained in:
parent
dc775bf8cb
commit
72e7a9f951
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,34 @@
|
|||
#ifndef _EFL_EPHYSICS_API_H
|
||||
#define _EFL_EPHYSICS_API_H
|
||||
|
||||
#ifdef EPHYSICS_API
|
||||
#error EPHYSICS_API should not be already defined
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef EPHYSICS_STATIC
|
||||
# ifdef EPHYSICS_BUILD
|
||||
# define EPHYSICS_API __declspec(dllexport)
|
||||
# else
|
||||
# define EPHYSICS_API __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define EPHYSICS_API
|
||||
# endif
|
||||
# define EPHYSICS_API_WEAK
|
||||
#else
|
||||
# ifdef __GNUC__
|
||||
# if __GNUC__ >= 4
|
||||
# define EPHYSICS_API __attribute__ ((visibility("default")))
|
||||
# define EPHYSICS_API_WEAK __attribute__ ((weak))
|
||||
# else
|
||||
# define EPHYSICS_API
|
||||
# define EPHYSICS_API_WEAK
|
||||
# endif
|
||||
# else
|
||||
# define EPHYSICS_API
|
||||
define EPHYSICS_API_WEAK
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -86,7 +86,7 @@ _ephysics_body_cloth_anchor_mass_reset(EPhysics_Body *body)
|
|||
DBG("Cloth anchors mass reset.");
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
_ephysics_body_soft_body_light_apply(Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab, Evas_Coord bx, Evas_Coord by, Evas_Coord bz)
|
||||
{
|
||||
double x, y, z, nx, ny, nz, ln, br;
|
||||
|
@ -308,7 +308,7 @@ _ephysics_body_soft_body_slices_get(EPhysics_Body *body)
|
|||
return slices;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
EPHYSICS_API int
|
||||
ephysics_body_soft_body_slice_index_get(EPhysics_Body *body, Evas_Object *slice)
|
||||
{
|
||||
Eina_List *slices;
|
||||
|
@ -716,7 +716,7 @@ ephysics_body_filter_collision(EPhysics_Body *body0, EPhysics_Body *body1)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_body_collision_group_add(EPhysics_Body *body, const char *group)
|
||||
{
|
||||
Eina_Stringshare *group_str;
|
||||
|
@ -742,7 +742,7 @@ ephysics_body_collision_group_add(EPhysics_Body *body, const char *group)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_body_collision_group_del(EPhysics_Body *body, const char *group)
|
||||
{
|
||||
Eina_Stringshare *group_str;
|
||||
|
@ -769,7 +769,7 @@ ephysics_body_collision_group_del(EPhysics_Body *body, const char *group)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI const Eina_List *
|
||||
EPHYSICS_API const Eina_List *
|
||||
ephysics_body_collision_group_list_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -1813,7 +1813,7 @@ ephysics_body_evas_object_update_select(EPhysics_Body *body)
|
|||
_ephysics_body_outside_render_area_check(body);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_collision_position_get(const EPhysics_Body_Collision *collision, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z)
|
||||
{
|
||||
if (!collision)
|
||||
|
@ -1827,7 +1827,7 @@ ephysics_body_collision_position_get(const EPhysics_Body_Collision *collision, E
|
|||
if (z) *z = collision->z;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_collision_contact_body_get(const EPhysics_Body_Collision *collision)
|
||||
{
|
||||
if (!collision)
|
||||
|
@ -1886,7 +1886,7 @@ ephysics_body_soft_body_get(const EPhysics_Body *body)
|
|||
return body->soft_body;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_anchor_hardness_set(EPhysics_Body *body, double hardness)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -1916,7 +1916,7 @@ ephysics_body_soft_body_anchor_hardness_set(EPhysics_Body *body, double hardness
|
|||
DBG("Soft body anchor hardness set to: %lf", hardness);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_soft_body_anchor_hardness_get(EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -1935,7 +1935,7 @@ ephysics_body_soft_body_anchor_hardness_get(EPhysics_Body *body)
|
|||
return body->soft_body->m_cfg.kAHR * 100;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_drag_coefficient_set(EPhysics_Body *body, double coefficient)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -1955,7 +1955,7 @@ ephysics_body_soft_body_drag_coefficient_set(EPhysics_Body *body, double coeffic
|
|||
DBG("Soft body drag coefficient set to: %lf", coefficient);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_soft_body_drag_coefficient_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -1995,7 +1995,7 @@ _ephysics_body_soft_body_hardness_set(EPhysics_Body *body, double hardness)
|
|||
DBG("Soft body %p hardness set to %lf.", body, hardness);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_hardness_set(EPhysics_Body *body, double hardness)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -2021,7 +2021,7 @@ ephysics_body_soft_body_hardness_set(EPhysics_Body *body, double hardness)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_dragging_set(EPhysics_Body *body, int triangle)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -2050,7 +2050,7 @@ ephysics_body_soft_body_dragging_set(EPhysics_Body *body, int triangle)
|
|||
DBG("Body %p appended to world's dragging bodies list.", body);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_dragging_unset(EPhysics_Body *body)
|
||||
{
|
||||
btSoftBody::Face face;
|
||||
|
@ -2086,7 +2086,7 @@ ephysics_body_soft_body_dragging_unset(EPhysics_Body *body)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_soft_body_hardness_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -2140,7 +2140,7 @@ _ephysics_body_soft_body_add(EPhysics_World *world, btCollisionShape *collision_
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_cloth_anchor_full_add(EPhysics_Body *body1, EPhysics_Body *body2, EPhysics_Body_Cloth_Anchor_Side side)
|
||||
{
|
||||
int rows;
|
||||
|
@ -2201,7 +2201,7 @@ ephysics_body_cloth_anchor_full_add(EPhysics_Body *body1, EPhysics_Body *body2,
|
|||
_ephysics_body_cloth_anchor_mass_reset(body1);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_cloth_anchor_add(EPhysics_Body *body1, EPhysics_Body *body2, int node)
|
||||
{
|
||||
if (!body1 || !body2)
|
||||
|
@ -2221,7 +2221,7 @@ ephysics_body_cloth_anchor_add(EPhysics_Body *body1, EPhysics_Body *body2, int n
|
|||
_ephysics_body_cloth_anchor_mass_reset(body1);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_cloth_anchor_del(EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -2264,7 +2264,7 @@ _ephysics_body_slices_add(EPhysics_Body *body, int slices_cnt, int *points, doub
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_position_iterations_set(EPhysics_Body *body, int iterations)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -2285,7 +2285,7 @@ ephysics_body_soft_body_position_iterations_set(EPhysics_Body *body, int iterati
|
|||
DBG("Soft body position solver iterations set to: %d", iterations);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
EPHYSICS_API int
|
||||
ephysics_body_soft_body_position_iterations_get(EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -2305,7 +2305,7 @@ ephysics_body_soft_body_position_iterations_get(EPhysics_Body *body)
|
|||
return body->soft_body->m_cfg.piterations;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_bending_constraints_add(EPhysics_Body *body, int number)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -2325,7 +2325,7 @@ ephysics_body_soft_body_bending_constraints_add(EPhysics_Body *body, int number)
|
|||
DBG("Added new bending constraints to body: %p", body);
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_cloth_add(EPhysics_World *world, unsigned short rows, unsigned short columns)
|
||||
{
|
||||
EPhysics_Body *body;
|
||||
|
@ -2449,7 +2449,7 @@ ephysics_body_soft_body_dragging_apply(EPhysics_Body *body)
|
|||
node->m_im *= 0;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_triangle_move(EPhysics_Body *body, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z)
|
||||
{
|
||||
btScalar xx, yy, zz;
|
||||
|
@ -2506,7 +2506,7 @@ ephysics_body_soft_body_triangle_move(EPhysics_Body *body, int idx, Evas_Coord x
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI Eina_List *
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
Eina_List *face_list = NULL;
|
||||
|
@ -2586,7 +2586,7 @@ _ephysics_body_soft_body_triangle_impulse_apply(EPhysics_Body *body, int idx, do
|
|||
impulse.y(), impulse.z());
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_triangle_impulse_apply(EPhysics_Body * body, int idx, double x, double y, double z)
|
||||
{
|
||||
|
||||
|
@ -2608,7 +2608,7 @@ ephysics_body_soft_body_triangle_impulse_apply(EPhysics_Body * body, int idx, do
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_soft_body_triangle_list_impulse_apply(EPhysics_Body *body, Eina_List *triangles, double x, double y, double z)
|
||||
{
|
||||
Eina_List *l;
|
||||
|
@ -2639,7 +2639,7 @@ ephysics_body_soft_body_triangle_list_impulse_apply(EPhysics_Body *body, Eina_Li
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
EPHYSICS_API int
|
||||
ephysics_body_soft_body_triangle_index_get(EPhysics_Body *body, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
int w, h, r, c, index = -1;
|
||||
|
@ -2745,7 +2745,7 @@ no_deform:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_soft_sphere_add(EPhysics_World *world, int granularity)
|
||||
{
|
||||
EPhysics_Body *body;
|
||||
|
@ -2824,7 +2824,7 @@ no_collision_shape:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_soft_cylinder_add(EPhysics_World *world)
|
||||
{
|
||||
EPhysics_Body *body;
|
||||
|
@ -2914,7 +2914,7 @@ no_collision_shape:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_sphere_add(EPhysics_World *world)
|
||||
{
|
||||
btCollisionShape *collision_shape;
|
||||
|
@ -2941,7 +2941,7 @@ ephysics_body_sphere_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_cylinder_add(EPhysics_World *world)
|
||||
{
|
||||
btCollisionShape *collision_shape;
|
||||
|
@ -2968,7 +2968,7 @@ ephysics_body_cylinder_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_soft_box_add(EPhysics_World *world)
|
||||
{
|
||||
EPhysics_Body *body;
|
||||
|
@ -3058,7 +3058,7 @@ no_collision_shape:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_box_add(EPhysics_World *world)
|
||||
{
|
||||
btCollisionShape *collision_shape;
|
||||
|
@ -3080,7 +3080,7 @@ ephysics_body_box_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_shape_add(EPhysics_World *world, EPhysics_Shape *shape)
|
||||
{
|
||||
double max_x, max_y, max_z, min_x, min_y, min_z, cm_x, cm_y, cm_z,
|
||||
|
@ -3269,7 +3269,7 @@ _ephysics_body_boundary_add(EPhysics_World *world, EPhysics_World_Boundary bound
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_top_boundary_add(EPhysics_World *world)
|
||||
{
|
||||
Evas_Coord x, y, z, w, d;
|
||||
|
@ -3281,7 +3281,7 @@ ephysics_body_top_boundary_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_bottom_boundary_add(EPhysics_World *world)
|
||||
{
|
||||
Evas_Coord x, y, z, w, h, d;
|
||||
|
@ -3293,7 +3293,7 @@ ephysics_body_bottom_boundary_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_left_boundary_add(EPhysics_World *world)
|
||||
{
|
||||
Evas_Coord x, y, z, h, d;
|
||||
|
@ -3305,7 +3305,7 @@ ephysics_body_left_boundary_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_right_boundary_add(EPhysics_World *world)
|
||||
{
|
||||
Evas_Coord x, y, z, w, h, d;
|
||||
|
@ -3317,7 +3317,7 @@ ephysics_body_right_boundary_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_front_boundary_add(EPhysics_World *world)
|
||||
{
|
||||
Evas_Coord x, y, z, w, h;
|
||||
|
@ -3329,7 +3329,7 @@ ephysics_body_front_boundary_add(EPhysics_World *world)
|
|||
return body;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body *
|
||||
EPHYSICS_API EPhysics_Body *
|
||||
ephysics_body_back_boundary_add(EPhysics_World *world)
|
||||
{
|
||||
Evas_Coord x, y, z, w, h, d;
|
||||
|
@ -3350,7 +3350,7 @@ ephysics_orphan_body_del(EPhysics_Body *body)
|
|||
_ephysics_body_del(body);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_del(EPhysics_Body *body)
|
||||
{
|
||||
EPhysics_World *world;
|
||||
|
@ -3370,7 +3370,7 @@ ephysics_body_del(EPhysics_Body *body)
|
|||
ephysics_world_lock_release(world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_evas_object_set(EPhysics_Body *body, Evas_Object *evas_obj, Eina_Bool use_obj_pos)
|
||||
{
|
||||
int obj_x, obj_y, obj_w, obj_h, bz, bd;
|
||||
|
@ -3433,7 +3433,7 @@ ephysics_body_evas_object_set(EPhysics_Body *body, Evas_Object *evas_obj, Eina_B
|
|||
_ephysics_body_efl_canvas_object_resize_cb, body);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
EPHYSICS_API Evas_Object *
|
||||
ephysics_body_evas_object_unset(EPhysics_Body *body)
|
||||
{
|
||||
Evas_Object *obj;
|
||||
|
@ -3467,7 +3467,7 @@ ephysics_body_evas_object_unset(EPhysics_Body *body)
|
|||
return obj;
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
EPHYSICS_API Evas_Object *
|
||||
ephysics_body_evas_object_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3479,7 +3479,7 @@ ephysics_body_evas_object_get(const EPhysics_Body *body)
|
|||
return body->evas_obj;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3503,7 +3503,7 @@ ephysics_body_geometry_set(EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_resize(EPhysics_Body *body, Evas_Coord w, Evas_Coord h, Evas_Coord d)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3523,7 +3523,7 @@ ephysics_body_resize(EPhysics_Body *body, Evas_Coord w, Evas_Coord h, Evas_Coord
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_move(EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas_Coord z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3537,7 +3537,7 @@ ephysics_body_move(EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Evas_Coord z
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
btTransform trans;
|
||||
|
@ -3568,7 +3568,7 @@ ephysics_body_geometry_get(const EPhysics_Body *body, Evas_Coord *x, Evas_Coord
|
|||
if (d) *d = body->size.d;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_mass_set(EPhysics_Body *body, double mass)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3590,7 +3590,7 @@ ephysics_body_mass_set(EPhysics_Body *body, double mass)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_mass_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3602,7 +3602,7 @@ ephysics_body_mass_get(const EPhysics_Body *body)
|
|||
return body->mass;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_linear_velocity_set(EPhysics_Body *body, double x, double y, double z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3631,7 +3631,7 @@ _ephysics_body_soft_body_linear_velocity_get(const EPhysics_Body *body, double *
|
|||
if (z) *z = total_velocity.getZ() * rate;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_linear_velocity_get(const EPhysics_Body *body, double *x, double *y, double *z)
|
||||
{
|
||||
double rate;
|
||||
|
@ -3653,7 +3653,7 @@ ephysics_body_linear_velocity_get(const EPhysics_Body *body, double *x, double *
|
|||
_ephysics_body_soft_body_linear_velocity_get(body, x, y, z, rate);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_angular_velocity_set(EPhysics_Body *body, double x, double y, double z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3674,7 +3674,7 @@ ephysics_body_angular_velocity_set(EPhysics_Body *body, double x, double y, doub
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_angular_velocity_get(const EPhysics_Body *body, double *x, double *y, double *z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3690,7 +3690,7 @@ ephysics_body_angular_velocity_get(const EPhysics_Body *body, double *x, double
|
|||
if (z) *z = -body->rigid_body->getAngularVelocity().getZ() * RAD_TO_DEG;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_sleeping_threshold_set(EPhysics_Body *body, double linear_threshold, double angular_threshold)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3708,7 +3708,7 @@ ephysics_body_sleeping_threshold_set(EPhysics_Body *body, double linear_threshol
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_sleeping_threshold_get(const EPhysics_Body *body, double *linear_threshold, double *angular_threshold)
|
||||
{
|
||||
double rate;
|
||||
|
@ -3729,7 +3729,7 @@ ephysics_body_sleeping_threshold_get(const EPhysics_Body *body, double *linear_t
|
|||
RAD_TO_DEG;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_stop(EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3758,7 +3758,7 @@ ephysics_body_stop(EPhysics_Body *body)
|
|||
DBG("Body %p stopped", body);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_damping_set(EPhysics_Body *body, double linear_damping, double angular_damping)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3775,7 +3775,7 @@ ephysics_body_damping_set(EPhysics_Body *body, double linear_damping, double ang
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_damping_get(const EPhysics_Body *body, double *linear_damping, double *angular_damping)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3791,7 +3791,7 @@ ephysics_body_damping_get(const EPhysics_Body *body, double *linear_damping, dou
|
|||
body->rigid_body->getAngularDamping();
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_evas_object_update(EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3803,7 +3803,7 @@ ephysics_body_evas_object_update(EPhysics_Body *body)
|
|||
_ephysics_body_evas_object_default_update(body);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_event_callback_add(EPhysics_Body *body, EPhysics_Callback_Body_Type type, EPhysics_Body_Event_Cb func, const void *data)
|
||||
{
|
||||
EPhysics_Body_Callback *cb;
|
||||
|
@ -3842,7 +3842,7 @@ ephysics_body_event_callback_add(EPhysics_Body *body, EPhysics_Callback_Body_Typ
|
|||
body->collision_cb++;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
EPHYSICS_API void *
|
||||
ephysics_body_event_callback_del(EPhysics_Body *body, EPhysics_Callback_Body_Type type, EPhysics_Body_Event_Cb func)
|
||||
{
|
||||
EPhysics_Body_Callback *cb;
|
||||
|
@ -3869,7 +3869,7 @@ ephysics_body_event_callback_del(EPhysics_Body *body, EPhysics_Callback_Body_Typ
|
|||
return cb_data;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
EPHYSICS_API void *
|
||||
ephysics_body_event_callback_del_full(EPhysics_Body *body, EPhysics_Callback_Body_Type type, EPhysics_Body_Event_Cb func, void *data)
|
||||
{
|
||||
EPhysics_Body_Callback *cb;
|
||||
|
@ -3907,7 +3907,7 @@ _ephysics_body_restitution_set(EPhysics_Body *body, double restitution)
|
|||
body->soft_body->setRestitution(btScalar(restitution));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_restitution_set(EPhysics_Body *body, double restitution)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3922,7 +3922,7 @@ ephysics_body_restitution_set(EPhysics_Body *body, double restitution)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_restitution_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3950,7 +3950,7 @@ _ephysics_body_friction_set(EPhysics_Body *body, double friction)
|
|||
body->soft_body->setFriction(btScalar(friction));
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_friction_set(EPhysics_Body *body, double friction)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3965,7 +3965,7 @@ ephysics_body_friction_set(EPhysics_Body *body, double friction)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_friction_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -3980,7 +3980,7 @@ ephysics_body_friction_get(const EPhysics_Body *body)
|
|||
return body->soft_body->getFriction();
|
||||
}
|
||||
|
||||
EAPI EPhysics_World *
|
||||
EPHYSICS_API EPhysics_World *
|
||||
ephysics_body_world_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4005,7 +4005,7 @@ _ephysics_body_soft_body_central_impulse_apply(EPhysics_Body *body, btVector3 im
|
|||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_central_impulse_apply(EPhysics_Body *body, double x, double y, double z)
|
||||
{
|
||||
double rate;
|
||||
|
@ -4032,7 +4032,7 @@ ephysics_body_central_impulse_apply(EPhysics_Body *body, double x, double y, dou
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
double rate;
|
||||
|
@ -4054,7 +4054,7 @@ ephysics_body_impulse_apply(EPhysics_Body *body, double x, double y, double z, E
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_linear_movement_enable_set(EPhysics_Body *body, Eina_Bool enable_x, Eina_Bool enable_y, Eina_Bool enable_z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4071,7 +4071,7 @@ ephysics_body_linear_movement_enable_set(EPhysics_Body *body, Eina_Bool enable_x
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_linear_movement_enable_get(const EPhysics_Body *body, Eina_Bool *enable_x, Eina_Bool *enable_y, Eina_Bool *enable_z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4087,7 +4087,7 @@ ephysics_body_linear_movement_enable_get(const EPhysics_Body *body, Eina_Bool *e
|
|||
if (enable_z) *enable_z = !!body->rigid_body->getLinearFactor().z();
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_torque_impulse_apply(EPhysics_Body *body, double pitch, double yaw, double roll)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4102,7 +4102,7 @@ ephysics_body_torque_impulse_apply(EPhysics_Body *body, double pitch, double yaw
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_angular_movement_enable_set(EPhysics_Body *body, Eina_Bool enable_x, Eina_Bool enable_y, Eina_Bool enable_z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4119,7 +4119,7 @@ ephysics_body_angular_movement_enable_set(EPhysics_Body *body, Eina_Bool enable_
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_angular_movement_enable_get(const EPhysics_Body *body, Eina_Bool *enable_x, Eina_Bool *enable_y, Eina_Bool *enable_z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4135,7 +4135,7 @@ ephysics_body_angular_movement_enable_get(const EPhysics_Body *body, Eina_Bool *
|
|||
if (enable_z) *enable_z = !!body->rigid_body->getAngularFactor().z();
|
||||
}
|
||||
|
||||
EAPI EPhysics_Quaternion *
|
||||
EPHYSICS_API EPhysics_Quaternion *
|
||||
ephysics_body_rotation_get(const EPhysics_Body *body, EPhysics_Quaternion *rotation)
|
||||
{
|
||||
EPhysics_Quaternion *quat;
|
||||
|
@ -4185,7 +4185,7 @@ _ephysics_body_soft_body_rotation_set(EPhysics_Body *body, btTransform trans)
|
|||
body->soft_body->updateConstants();
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_rotation_set(EPhysics_Body *body, EPhysics_Quaternion *quat)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -4224,7 +4224,7 @@ ephysics_body_rotation_set(EPhysics_Body *body, EPhysics_Quaternion *quat)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_data_set(EPhysics_Body *body, void *data)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4236,7 +4236,7 @@ ephysics_body_data_set(EPhysics_Body *body, void *data)
|
|||
body->data = data;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
EPHYSICS_API void *
|
||||
ephysics_body_data_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4248,7 +4248,7 @@ ephysics_body_data_get(const EPhysics_Body *body)
|
|||
return body->data;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_central_force_apply(EPhysics_Body *body, double x, double y, double z)
|
||||
{
|
||||
double rate;
|
||||
|
@ -4268,7 +4268,7 @@ ephysics_body_central_force_apply(EPhysics_Body *body, double x, double y, doubl
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
double rate;
|
||||
|
@ -4290,7 +4290,7 @@ ephysics_body_force_apply(EPhysics_Body *body, double x, double y, double z, Eva
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_torque_apply(EPhysics_Body *body, double torque_x, double torque_y, double torque_z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4306,7 +4306,7 @@ ephysics_body_torque_apply(EPhysics_Body *body, double torque_x, double torque_y
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_forces_get(const EPhysics_Body *body, double *x, double *y, double *z)
|
||||
{
|
||||
double rate, gx, gy, gz;
|
||||
|
@ -4325,7 +4325,7 @@ ephysics_body_forces_get(const EPhysics_Body *body, double *x, double *y, double
|
|||
if (z) *z = body->force.z * rate + gz;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_torques_get(const EPhysics_Body *body, double *x, double *y, double *z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4339,7 +4339,7 @@ ephysics_body_torques_get(const EPhysics_Body *body, double *x, double *y, doubl
|
|||
if (z) *z = -body->force.torque_z;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_forces_clear(EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4356,7 +4356,7 @@ ephysics_body_forces_clear(EPhysics_Body *body)
|
|||
body->force.torque_z = 0;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_center_mass_get(const EPhysics_Body *body, double *x, double *y, double *z)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4370,7 +4370,7 @@ ephysics_body_center_mass_get(const EPhysics_Body *body, double *x, double *y, d
|
|||
if (z) *z = body->cm.z;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_density_set(EPhysics_Body *body, double density)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4386,7 +4386,7 @@ ephysics_body_density_set(EPhysics_Body *body, double density)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_density_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4398,7 +4398,7 @@ ephysics_body_density_get(const EPhysics_Body *body)
|
|||
return body->density;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_material_set(EPhysics_Body *body, EPhysics_Body_Material material)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4436,7 +4436,7 @@ ephysics_body_material_set(EPhysics_Body *body, EPhysics_Body_Material material)
|
|||
ephysics_world_lock_release(body->world);
|
||||
}
|
||||
|
||||
EAPI EPhysics_Body_Material
|
||||
EPHYSICS_API EPhysics_Body_Material
|
||||
ephysics_body_material_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4448,7 +4448,7 @@ ephysics_body_material_get(const EPhysics_Body *body)
|
|||
return body->material;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_light_set(EPhysics_Body *body, Eina_Bool enable)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4460,7 +4460,7 @@ ephysics_body_light_set(EPhysics_Body *body, Eina_Bool enable)
|
|||
body->light_apply = !!enable;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_body_light_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4472,7 +4472,7 @@ ephysics_body_light_get(const EPhysics_Body *body)
|
|||
return body->light_apply;
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_body_volume_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4483,7 +4483,7 @@ ephysics_body_volume_get(const EPhysics_Body *body)
|
|||
return _ephysics_body_volume_get(body);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_back_face_culling_set(EPhysics_Body *body, Eina_Bool enable)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4494,7 +4494,7 @@ ephysics_body_back_face_culling_set(EPhysics_Body *body, Eina_Bool enable)
|
|||
body->back_face_culling = !!enable;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_body_back_face_culling_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -4505,7 +4505,7 @@ ephysics_body_back_face_culling_get(const EPhysics_Body *body)
|
|||
return body->back_face_culling;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_body_clockwise_get(const EPhysics_Body *body)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -5215,7 +5215,7 @@ _ephysics_body_soft_sphere_face_evas_object_unset(EPhysics_Body *body, EPhysics_
|
|||
return obj;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_body_face_evas_object_set(EPhysics_Body *body, EPhysics_Body_Face face, Evas_Object *evas_obj, Eina_Bool use_obj_pos)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -5249,7 +5249,7 @@ ephysics_body_face_evas_object_set(EPhysics_Body *body, EPhysics_Body_Face face,
|
|||
ERR("Can't handle body %p type.", body);
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
EPHYSICS_API Evas_Object *
|
||||
ephysics_body_face_evas_object_get(const EPhysics_Body *body, EPhysics_Body_Face face)
|
||||
{
|
||||
if (!body)
|
||||
|
@ -5274,7 +5274,7 @@ ephysics_body_face_evas_object_get(const EPhysics_Body *body, EPhysics_Body_Face
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
EPHYSICS_API Evas_Object *
|
||||
ephysics_body_face_evas_object_unset(EPhysics_Body *body, EPhysics_Body_Face face)
|
||||
{
|
||||
if (!body)
|
||||
|
|
|
@ -113,7 +113,7 @@ ephysics_camera_del(EPhysics_Camera *camera)
|
|||
INF("Camera deleted.");
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_camera_position_set(EPhysics_Camera *camera, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
if (!camera)
|
||||
|
@ -141,7 +141,7 @@ ephysics_camera_position_set(EPhysics_Camera *camera, Evas_Coord x, Evas_Coord y
|
|||
INF("Camera position set to (%i, %i).", x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_camera_position_get(const EPhysics_Camera *camera, Evas_Coord *x, Evas_Coord *y)
|
||||
{
|
||||
if (!camera)
|
||||
|
@ -154,7 +154,7 @@ ephysics_camera_position_get(const EPhysics_Camera *camera, Evas_Coord *x, Evas_
|
|||
if (y) *y = camera->y;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_camera_body_track(EPhysics_Camera *camera, EPhysics_Body *body, Eina_Bool horizontal, Eina_Bool vertical)
|
||||
{
|
||||
if (!camera)
|
||||
|
@ -195,7 +195,7 @@ ephysics_camera_body_track(EPhysics_Camera *camera, EPhysics_Body *body, Eina_Bo
|
|||
camera->track_horizontal, camera->track_vertical);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_camera_tracked_body_get(EPhysics_Camera *camera, EPhysics_Body **body, Eina_Bool *horizontal, Eina_Bool *vertical)
|
||||
{
|
||||
if (!camera)
|
||||
|
@ -209,7 +209,7 @@ ephysics_camera_tracked_body_get(EPhysics_Camera *camera, EPhysics_Body **body,
|
|||
if (vertical) *vertical = camera->track_vertical;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_camera_perspective_set(EPhysics_Camera *camera, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc)
|
||||
{
|
||||
if (!camera)
|
||||
|
@ -231,7 +231,7 @@ ephysics_camera_perspective_set(EPhysics_Camera *camera, Evas_Coord px, Evas_Coo
|
|||
ephysics_world_force_update_set(camera->world, EINA_TRUE);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_camera_perspective_get(const EPhysics_Camera *camera, Evas_Coord *px, Evas_Coord *py, Evas_Coord *z0, Evas_Coord *foc)
|
||||
{
|
||||
if (!camera)
|
||||
|
@ -246,7 +246,7 @@ ephysics_camera_perspective_get(const EPhysics_Camera *camera, Evas_Coord *px, E
|
|||
if (foc) *foc = camera->perspective.foc;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_camera_perspective_enabled_set(EPhysics_Camera *camera, Eina_Bool enabled)
|
||||
{
|
||||
if (!camera)
|
||||
|
@ -259,7 +259,7 @@ ephysics_camera_perspective_enabled_set(EPhysics_Camera *camera, Eina_Bool enabl
|
|||
ephysics_world_force_update_set(camera->world, EINA_TRUE);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_camera_perspective_enabled_get(const EPhysics_Camera *camera)
|
||||
{
|
||||
if (!camera)
|
||||
|
|
|
@ -97,7 +97,7 @@ ephysics_constraint_recalc(EPhysics_Constraint *constraint, double rate)
|
|||
upper_y, lower_z, upper_z, rate);
|
||||
}
|
||||
|
||||
EAPI EPhysics_Constraint *
|
||||
EPHYSICS_API EPhysics_Constraint *
|
||||
ephysics_constraint_add(EPhysics_Body *body)
|
||||
{
|
||||
EPhysics_Constraint *constraint;
|
||||
|
@ -140,7 +140,7 @@ ephysics_constraint_add(EPhysics_Body *body)
|
|||
return constraint;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
double rate;
|
||||
|
@ -158,7 +158,7 @@ ephysics_constraint_linear_limit_set(EPhysics_Constraint *constraint, Evas_Coord
|
|||
ephysics_world_lock_release(constraint->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
int rate;
|
||||
|
@ -174,7 +174,7 @@ ephysics_constraint_linear_limit_get(const EPhysics_Constraint *constraint, Evas
|
|||
upper_y, lower_z, upper_z, rate);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
|
||||
|
@ -195,7 +195,7 @@ ephysics_constraint_angular_limit_set(EPhysics_Constraint *constraint, double co
|
|||
ephysics_world_lock_release(constraint->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
btVector3 angular_limit;
|
||||
|
@ -243,7 +243,7 @@ ephysics_constraint_angular_limit_get(const EPhysics_Constraint *constraint, dou
|
|||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
btTransform anchor_b1;
|
||||
|
@ -310,7 +310,7 @@ ephysics_constraint_anchor_set(EPhysics_Constraint *constraint, Evas_Coord ancho
|
|||
ephysics_world_lock_release(constraint->world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
btTransform anchor_b1;
|
||||
|
@ -336,7 +336,7 @@ ephysics_constraint_anchor_get(const EPhysics_Constraint *constraint, Evas_Coord
|
|||
if (anchor_b2_z) *anchor_b2_z = round(anchor_b2.getOrigin().z() * rate);
|
||||
}
|
||||
|
||||
EAPI EPhysics_Constraint *
|
||||
EPHYSICS_API EPhysics_Constraint *
|
||||
ephysics_constraint_linked_add(EPhysics_Body *body1, EPhysics_Body *body2)
|
||||
{
|
||||
EPhysics_Constraint *constraint;
|
||||
|
@ -394,7 +394,7 @@ ephysics_constraint_linked_add(EPhysics_Body *body1, EPhysics_Body *body2)
|
|||
return constraint;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_constraint_del(EPhysics_Constraint *constraint)
|
||||
{
|
||||
if (!constraint)
|
||||
|
|
|
@ -36,7 +36,7 @@ ephysics_dom_count_dec(void)
|
|||
eina_shutdown();
|
||||
}
|
||||
|
||||
EAPI int
|
||||
EPHYSICS_API int
|
||||
ephysics_init()
|
||||
{
|
||||
if (++_ephysics_init_count != 1)
|
||||
|
@ -82,7 +82,7 @@ no_ecore:
|
|||
return --_ephysics_init_count;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
EPHYSICS_API int
|
||||
ephysics_shutdown()
|
||||
{
|
||||
if (--_ephysics_init_count != 0)
|
||||
|
|
|
@ -32,7 +32,7 @@ _ephysics_quaternion_params_check(const EPhysics_Quaternion *quat1, const EPhysi
|
|||
return ephysics_quaternion_new();
|
||||
}
|
||||
|
||||
EAPI EPhysics_Quaternion *
|
||||
EPHYSICS_API EPhysics_Quaternion *
|
||||
ephysics_quaternion_new(void)
|
||||
{
|
||||
EPhysics_Quaternion *quat;
|
||||
|
@ -49,7 +49,7 @@ ephysics_quaternion_new(void)
|
|||
return quat;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_get(const EPhysics_Quaternion *quat, double *x, double *y, double *z, double *w)
|
||||
{
|
||||
if (!quat)
|
||||
|
@ -64,7 +64,7 @@ ephysics_quaternion_get(const EPhysics_Quaternion *quat, double *x, double *y, d
|
|||
if (w) *w = quat->w;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_axis_angle_get(const EPhysics_Quaternion *quat, double *nx, double *ny, double *nz, double *a)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -83,7 +83,7 @@ ephysics_quaternion_axis_angle_get(const EPhysics_Quaternion *quat, double *nx,
|
|||
if (a) *a = bt_quat.getAngle() * RAD_TO_DEG;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_set(EPhysics_Quaternion *quat, double x, double y, double z, double w)
|
||||
{
|
||||
if (!quat)
|
||||
|
@ -98,7 +98,7 @@ ephysics_quaternion_set(EPhysics_Quaternion *quat, double x, double y, double z,
|
|||
quat->w = w;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_axis_angle_set(EPhysics_Quaternion *quat, double nx, double ny, double nz, double a)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -115,7 +115,7 @@ ephysics_quaternion_axis_angle_set(EPhysics_Quaternion *quat, double nx, double
|
|||
_ephysics_quaternion_update(quat, &bt_quat);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_euler_set(EPhysics_Quaternion *quat, double yaw, double pitch, double roll)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -130,7 +130,7 @@ ephysics_quaternion_euler_set(EPhysics_Quaternion *quat, double yaw, double pitc
|
|||
_ephysics_quaternion_update(quat, &bt_quat);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_normalize(EPhysics_Quaternion *quat)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -146,7 +146,7 @@ ephysics_quaternion_normalize(EPhysics_Quaternion *quat)
|
|||
_ephysics_quaternion_update(quat, &bt_quat);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_invert(EPhysics_Quaternion *quat)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -162,7 +162,7 @@ ephysics_quaternion_invert(EPhysics_Quaternion *quat)
|
|||
_ephysics_quaternion_update(quat, &bt_quat);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_scale(EPhysics_Quaternion *quat, double scale)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -178,7 +178,7 @@ ephysics_quaternion_scale(EPhysics_Quaternion *quat, double scale)
|
|||
_ephysics_quaternion_update(quat, &bt_quat);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_quaternion_inverse_scale(EPhysics_Quaternion *quat, double scale)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -194,7 +194,7 @@ ephysics_quaternion_inverse_scale(EPhysics_Quaternion *quat, double scale)
|
|||
_ephysics_quaternion_update(quat, &bt_quat);
|
||||
}
|
||||
|
||||
EAPI EPhysics_Quaternion *
|
||||
EPHYSICS_API EPhysics_Quaternion *
|
||||
ephysics_quaternion_sum(const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
|
||||
{
|
||||
btQuaternion bt_quat1, bt_quat2, bt_quat;
|
||||
|
@ -211,7 +211,7 @@ ephysics_quaternion_sum(const EPhysics_Quaternion *quat1, const EPhysics_Quatern
|
|||
return quat;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Quaternion *
|
||||
EPHYSICS_API EPhysics_Quaternion *
|
||||
ephysics_quaternion_diff(const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
|
||||
{
|
||||
btQuaternion bt_quat1, bt_quat2, bt_quat;
|
||||
|
@ -228,7 +228,7 @@ ephysics_quaternion_diff(const EPhysics_Quaternion *quat1, const EPhysics_Quater
|
|||
return quat;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Quaternion *
|
||||
EPHYSICS_API EPhysics_Quaternion *
|
||||
ephysics_quaternion_multiply(const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, EPhysics_Quaternion *result)
|
||||
{
|
||||
btQuaternion bt_quat1, bt_quat2, bt_quat;
|
||||
|
@ -245,7 +245,7 @@ ephysics_quaternion_multiply(const EPhysics_Quaternion *quat1, const EPhysics_Qu
|
|||
return quat;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Quaternion *
|
||||
EPHYSICS_API EPhysics_Quaternion *
|
||||
ephysics_quaternion_slerp(const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2, double ratio, EPhysics_Quaternion *result)
|
||||
{
|
||||
btQuaternion bt_quat1, bt_quat2;
|
||||
|
@ -262,7 +262,7 @@ ephysics_quaternion_slerp(const EPhysics_Quaternion *quat1, const EPhysics_Quate
|
|||
return quat;
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_quaternion_dot(const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2)
|
||||
{
|
||||
btQuaternion bt_quat1, bt_quat2;
|
||||
|
@ -279,7 +279,7 @@ ephysics_quaternion_dot(const EPhysics_Quaternion *quat1, const EPhysics_Quatern
|
|||
return bt_quat1.dot(bt_quat2);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_quaternion_angle_get(const EPhysics_Quaternion *quat1, const EPhysics_Quaternion *quat2)
|
||||
{
|
||||
btQuaternion bt_quat1, bt_quat2;
|
||||
|
@ -296,7 +296,7 @@ ephysics_quaternion_angle_get(const EPhysics_Quaternion *quat1, const EPhysics_Q
|
|||
return bt_quat1.angle(bt_quat2) * RAD_TO_DEG;
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_quaternion_length_get(const EPhysics_Quaternion *quat)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
@ -311,7 +311,7 @@ ephysics_quaternion_length_get(const EPhysics_Quaternion *quat)
|
|||
return bt_quat.length();
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_quaternion_length2_get(const EPhysics_Quaternion *quat)
|
||||
{
|
||||
btQuaternion bt_quat;
|
||||
|
|
|
@ -33,7 +33,7 @@ ephysics_shape_points_get(const EPhysics_Shape *shape)
|
|||
return shape->points;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Shape *
|
||||
EPHYSICS_API EPhysics_Shape *
|
||||
ephysics_shape_new(void)
|
||||
{
|
||||
EPhysics_Shape *shape;
|
||||
|
@ -48,7 +48,7 @@ ephysics_shape_new(void)
|
|||
return shape;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_shape_del(EPhysics_Shape *shape)
|
||||
{
|
||||
EPhysics_Point *point;
|
||||
|
@ -69,7 +69,7 @@ ephysics_shape_del(EPhysics_Shape *shape)
|
|||
free(shape);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_shape_point_add(EPhysics_Shape *shape, double x, double y, double z)
|
||||
{
|
||||
EPhysics_Point *point;
|
||||
|
@ -94,7 +94,7 @@ ephysics_shape_point_add(EPhysics_Shape *shape, double x, double y, double z)
|
|||
}
|
||||
|
||||
/* TODO: load points from file */
|
||||
EAPI EPhysics_Shape *
|
||||
EPHYSICS_API EPhysics_Shape *
|
||||
ephysics_shape_load(const char *filename EINA_UNUSED)
|
||||
{
|
||||
EPhysics_Shape *shape;
|
||||
|
@ -107,7 +107,7 @@ ephysics_shape_load(const char *filename EINA_UNUSED)
|
|||
}
|
||||
|
||||
/* TODO: save points to file */
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_shape_save(const EPhysics_Shape *shape EINA_UNUSED, const char *filename EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
|
|
|
@ -669,7 +669,7 @@ _th_cancel_cb(void *data, Ecore_Thread *th)
|
|||
_ephysics_world_free(world);
|
||||
}
|
||||
|
||||
EAPI EPhysics_World *
|
||||
EPHYSICS_API EPhysics_World *
|
||||
ephysics_world_new(void)
|
||||
{
|
||||
EPhysics_World *world;
|
||||
|
@ -817,7 +817,7 @@ no_camera:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_serialize(EPhysics_World *world, const char *path)
|
||||
{
|
||||
btDefaultSerializer *serializer;
|
||||
|
@ -896,7 +896,7 @@ _ephysics_world_running_set(EPhysics_World *world, Eina_Bool running)
|
|||
_anim_simulate = ecore_animator_add(_simulate_worlds, NULL);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_del(EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -926,7 +926,7 @@ ephysics_world_del(EPhysics_World *world)
|
|||
_ephysics_world_th_cancel(world);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_running_set(EPhysics_World *world, Eina_Bool running)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -940,7 +940,7 @@ ephysics_world_running_set(EPhysics_World *world, Eina_Bool running)
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_running_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -952,7 +952,7 @@ ephysics_world_running_get(const EPhysics_World *world)
|
|||
return world->running;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_max_sleeping_time_set(EPhysics_World *world, double sleeping_time)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -966,7 +966,7 @@ ephysics_world_max_sleeping_time_set(EPhysics_World *world, double sleeping_time
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_world_max_sleeping_time_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -978,7 +978,7 @@ ephysics_world_max_sleeping_time_get(const EPhysics_World *world)
|
|||
return world->max_sleeping_time;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_gravity_set(EPhysics_World *world, double gx, double gy, double gz)
|
||||
{
|
||||
EPhysics_Body *bd;
|
||||
|
@ -997,7 +997,7 @@ ephysics_world_gravity_set(EPhysics_World *world, double gx, double gy, double g
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_constraint_solver_iterations_set(EPhysics_World *world, int iterations)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1011,7 +1011,7 @@ ephysics_world_constraint_solver_iterations_set(EPhysics_World *world, int itera
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI int
|
||||
EPHYSICS_API int
|
||||
ephysics_world_constraint_solver_iterations_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1023,7 +1023,7 @@ ephysics_world_constraint_solver_iterations_get(const EPhysics_World *world)
|
|||
return world->dynamics_world->getSolverInfo().m_numIterations;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_constraint_solver_mode_enable_set(EPhysics_World *world, EPhysics_World_Solver_Mode solver_mode, Eina_Bool enable)
|
||||
{
|
||||
int current_solver_mode;
|
||||
|
@ -1041,7 +1041,7 @@ ephysics_world_constraint_solver_mode_enable_set(EPhysics_World *world, EPhysics
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_constraint_solver_mode_enable_get(const EPhysics_World *world, EPhysics_World_Solver_Mode solver_mode)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1053,7 +1053,7 @@ ephysics_world_constraint_solver_mode_enable_get(const EPhysics_World *world, EP
|
|||
return world->dynamics_world->getSolverInfo().m_solverMode & solver_mode;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_gravity_get(const EPhysics_World *world, double *gx, double *gy, double *gz)
|
||||
{
|
||||
btVector3 vector;
|
||||
|
@ -1071,7 +1071,7 @@ ephysics_world_gravity_get(const EPhysics_World *world, double *gx, double *gy,
|
|||
if (gz) *gz = vector.z() * world->rate;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_rate_set(EPhysics_World *world, double rate)
|
||||
{
|
||||
EPhysics_Body *body;
|
||||
|
@ -1107,7 +1107,7 @@ ephysics_world_rate_set(EPhysics_World *world, double rate)
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_world_rate_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1119,7 +1119,7 @@ ephysics_world_rate_get(const EPhysics_World *world)
|
|||
return world->rate;
|
||||
}
|
||||
|
||||
EAPI EPhysics_Camera *
|
||||
EPHYSICS_API EPhysics_Camera *
|
||||
ephysics_world_camera_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1131,7 +1131,7 @@ ephysics_world_camera_get(const EPhysics_World *world)
|
|||
return world->camera;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_event_callback_add(EPhysics_World *world, EPhysics_Callback_World_Type type, EPhysics_World_Event_Cb func, const void *data)
|
||||
{
|
||||
EPhysics_World_Callback *cb;
|
||||
|
@ -1168,7 +1168,7 @@ ephysics_world_event_callback_add(EPhysics_World *world, EPhysics_Callback_World
|
|||
world->callbacks = eina_inlist_append(world->callbacks, EINA_INLIST_GET(cb));
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
EPHYSICS_API void *
|
||||
ephysics_world_event_callback_del(EPhysics_World *world, EPhysics_Callback_World_Type type, EPhysics_World_Event_Cb func)
|
||||
{
|
||||
EPhysics_World_Callback *cb;
|
||||
|
@ -1193,7 +1193,7 @@ ephysics_world_event_callback_del(EPhysics_World *world, EPhysics_Callback_World
|
|||
return cb_data;
|
||||
}
|
||||
|
||||
EAPI void *
|
||||
EPHYSICS_API void *
|
||||
ephysics_world_event_callback_del_full(EPhysics_World *world, EPhysics_Callback_World_Type type, EPhysics_World_Event_Cb func, void *data)
|
||||
{
|
||||
EPhysics_World_Callback *cb;
|
||||
|
@ -1218,7 +1218,7 @@ ephysics_world_event_callback_del_full(EPhysics_World *world, EPhysics_Callback_
|
|||
return cb_data;
|
||||
}
|
||||
|
||||
EAPI Eina_List *
|
||||
EPHYSICS_API Eina_List *
|
||||
ephysics_world_bodies_get(const EPhysics_World *world)
|
||||
{
|
||||
Eina_List *list = NULL;
|
||||
|
@ -1236,7 +1236,7 @@ ephysics_world_bodies_get(const EPhysics_World *world)
|
|||
return list;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1268,7 +1268,7 @@ ephysics_world_render_geometry_set(EPhysics_World *world, Evas_Coord x, Evas_Coo
|
|||
ephysics_camera_position_set(world->camera, x, y);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API 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)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1285,7 +1285,7 @@ ephysics_world_render_geometry_get(const EPhysics_World *world, Evas_Coord *x, E
|
|||
if (d) *d = world->geometry.d;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_linear_slop_set(EPhysics_World *world, double linear_slop)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1299,7 +1299,7 @@ ephysics_world_linear_slop_set(EPhysics_World *world, double linear_slop)
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI double
|
||||
EPHYSICS_API double
|
||||
ephysics_world_linear_slop_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1311,7 +1311,7 @@ ephysics_world_linear_slop_get(const EPhysics_World *world)
|
|||
return world->dynamics_world->getSolverInfo().m_linearSlop;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_bodies_outside_top_autodel_set(EPhysics_World *world, Eina_Bool autodel)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1326,7 +1326,7 @@ ephysics_world_bodies_outside_top_autodel_set(EPhysics_World *world, Eina_Bool a
|
|||
world->outside_front || world->outside_back;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_bodies_outside_top_autodel_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1338,7 +1338,7 @@ ephysics_world_bodies_outside_top_autodel_get(const EPhysics_World *world)
|
|||
return world->outside_top;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_bodies_outside_bottom_autodel_set(EPhysics_World *world, Eina_Bool autodel)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1353,7 +1353,7 @@ ephysics_world_bodies_outside_bottom_autodel_set(EPhysics_World *world, Eina_Boo
|
|||
world->outside_front || world->outside_back;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_bodies_outside_bottom_autodel_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1365,7 +1365,7 @@ ephysics_world_bodies_outside_bottom_autodel_get(const EPhysics_World *world)
|
|||
return world->outside_bottom;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_bodies_outside_left_autodel_set(EPhysics_World *world, Eina_Bool autodel)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1380,7 +1380,7 @@ ephysics_world_bodies_outside_left_autodel_set(EPhysics_World *world, Eina_Bool
|
|||
world->outside_front || world->outside_back;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_bodies_outside_left_autodel_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1392,7 +1392,7 @@ ephysics_world_bodies_outside_left_autodel_get(const EPhysics_World *world)
|
|||
return world->outside_left;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_bodies_outside_right_autodel_set(EPhysics_World *world, Eina_Bool autodel)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1407,7 +1407,7 @@ ephysics_world_bodies_outside_right_autodel_set(EPhysics_World *world, Eina_Bool
|
|||
world->outside_front || world->outside_back;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_bodies_outside_right_autodel_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1419,7 +1419,7 @@ ephysics_world_bodies_outside_right_autodel_get(const EPhysics_World *world)
|
|||
return world->outside_right;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_bodies_outside_front_autodel_set(EPhysics_World *world, Eina_Bool autodel)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1434,7 +1434,7 @@ ephysics_world_bodies_outside_front_autodel_set(EPhysics_World *world, Eina_Bool
|
|||
world->outside_front || world->outside_back;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_bodies_outside_front_autodel_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1446,7 +1446,7 @@ ephysics_world_bodies_outside_front_autodel_get(const EPhysics_World *world)
|
|||
return world->outside_front;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_bodies_outside_back_autodel_set(EPhysics_World *world, Eina_Bool autodel)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1461,7 +1461,7 @@ ephysics_world_bodies_outside_back_autodel_set(EPhysics_World *world, Eina_Bool
|
|||
world->outside_front || world->outside_back;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_bodies_outside_back_autodel_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1473,7 +1473,7 @@ ephysics_world_bodies_outside_back_autodel_get(const EPhysics_World *world)
|
|||
return world->outside_back;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_bodies_outside_autodel_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1485,7 +1485,7 @@ ephysics_world_bodies_outside_autodel_get(const EPhysics_World *world)
|
|||
return world->outside_autodel;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_simulation_set(EPhysics_World *world, double fixed_time_step, int max_sub_steps)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1515,7 +1515,7 @@ ephysics_world_simulation_set(EPhysics_World *world, double fixed_time_step, int
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_simulation_get(const EPhysics_World *world, double *fixed_time_step, int *max_sub_steps)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1540,7 +1540,7 @@ ephysics_world_lock_release(EPhysics_World *world)
|
|||
eina_lock_release(&world->mutex);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_point_light_position_set(EPhysics_World *world, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1555,7 +1555,7 @@ ephysics_world_point_light_position_set(EPhysics_World *world, Evas_Coord lx, Ev
|
|||
world->force_update = EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_point_light_color_set(EPhysics_World *world, int lr, int lg, int lb)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1570,7 +1570,7 @@ ephysics_world_point_light_color_set(EPhysics_World *world, int lr, int lg, int
|
|||
world->force_update = EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_ambient_light_color_set(EPhysics_World *world, int ar, int ag, int ab)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1585,7 +1585,7 @@ ephysics_world_ambient_light_color_set(EPhysics_World *world, int ar, int ag, in
|
|||
world->force_update = EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_ambient_light_color_get(const EPhysics_World *world, int *ar, int *ag, int *ab)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1599,7 +1599,7 @@ ephysics_world_ambient_light_color_get(const EPhysics_World *world, int *ar, int
|
|||
if (ab) *ab = world->light.ab;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_point_light_color_get(const EPhysics_World *world, int *lr, int *lg, int *lb)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1613,7 +1613,7 @@ ephysics_world_point_light_color_get(const EPhysics_World *world, int *lr, int *
|
|||
if (lb) *lb = world->light.lb;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_point_light_position_get(const EPhysics_World *world, Evas_Coord *lx, Evas_Coord *ly, Evas_Coord *lz)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1627,7 +1627,7 @@ ephysics_world_point_light_position_get(const EPhysics_World *world, Evas_Coord
|
|||
if (lz) *lz = world->light.lz;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_light_all_bodies_set(EPhysics_World *world, Eina_Bool enable)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1640,7 +1640,7 @@ ephysics_world_light_all_bodies_set(EPhysics_World *world, Eina_Bool enable)
|
|||
world->force_update = EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_light_all_bodies_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1652,7 +1652,7 @@ ephysics_world_light_all_bodies_get(const EPhysics_World *world)
|
|||
return world->light.all_bodies;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
EPHYSICS_API void
|
||||
ephysics_world_stack_enable_set(EPhysics_World *world, Eina_Bool enabled)
|
||||
{
|
||||
if (!world)
|
||||
|
@ -1663,7 +1663,7 @@ ephysics_world_stack_enable_set(EPhysics_World *world, Eina_Bool enabled)
|
|||
world->stacking = !!enabled;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
EPHYSICS_API Eina_Bool
|
||||
ephysics_world_stack_enable_get(const EPhysics_World *world)
|
||||
{
|
||||
if (!world)
|
||||
|
|
|
@ -5,6 +5,7 @@ ephysics_pub_deps = [eina, eo, efl]
|
|||
ephysics_ext_deps = [m, bullet]
|
||||
ephysics_header_src = [
|
||||
'EPhysics.h'
|
||||
'ephysics_api.h'
|
||||
]
|
||||
|
||||
ephysics_src = files([
|
||||
|
@ -25,7 +26,7 @@ ephysics_lib = library('ephysics',
|
|||
dependencies: ephysics_pub_deps + ephysics_deps + ephysics_ext_deps,
|
||||
include_directories : config_dir + [include_directories('.')],
|
||||
install: true,
|
||||
c_args : package_c_args,
|
||||
c_args : [package_c_args, '-DEPHYSICS_BUILD'],
|
||||
version : meson.project_version()
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue