summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/lib/EPhysics.h
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2012-11-23 21:52:08 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-11-23 21:52:08 +0000
commit1a1adc1a5fd0ff1b8c289da72a685692af5d1874 (patch)
treef8abc514a00fb25ef2cd7b5440945af8a6a0f02f /legacy/ephysics/src/lib/EPhysics.h
parent889ba8d30705a22fd15aa23a5a5f87ce9fc3455a (diff)
EPhysics: soft body operations on triangles list
This patch introduces API to get a list of triangles inside an area and another to apply impulse - also - in a list of triangles. Patch by: Leandro Dorileo <dorileo@profusion.mobi> SVN revision: 79607
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index 9172ab00e1..9b238460a3 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -2428,6 +2428,35 @@ EAPI EPhysics_Body *ephysics_body_soft_ellipsoid_add(EPhysics_World *world, int
2428 2428
2429/** 2429/**
2430 * @brief 2430 * @brief
2431 * Get a list of triangles indexes inside an area.
2432 *
2433 * Get a list of triangles indexes given an area defined by @p x, @p y, @p z, @p
2434 * w, @p h and @p d, the z axis components are represented by @p x and @p d
2435 * where all triangles between @p z and @p d are considered, that's triangles
2436 * with their z component greater than @p z and smaller than @p d.
2437 *
2438 * @note EPhysics will not free the returned list, remember to do so.
2439 *
2440 * @param body The body to get triangles indexes from.
2441 * @param x The x component.
2442 * @param y The y component.
2443 * @param z The z component.
2444 * @param w The w component.
2445 * @param h The h component.
2446 * @param d The d component.
2447 *
2448 * @return NULL on errors or no triangles found, a list of triangles indexes
2449 * otherwhise.
2450 *
2451 * @see ephysics_body_soft_body_triangle_index_get().
2452 * @see ephysics_body_soft_body_slice_index_get().
2453 *
2454 * @ingroup EPhysics_Body
2455 */
2456EAPI 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);
2457
2458/**
2459 * @brief
2431 * Apply an impulse on a given soft body triangle. 2460 * Apply an impulse on a given soft body triangle.
2432 * 2461 *
2433 * The impulse is equal to the change of momentum of the body. 2462 * The impulse is equal to the change of momentum of the body.
@@ -2455,6 +2484,27 @@ EAPI void ephysics_body_soft_body_triangle_impulse_apply(EPhysics_Body * body, i
2455 2484
2456/** 2485/**
2457 * @brief 2486 * @brief
2487 * Apply impulse in a list of triangles.
2488 *
2489 * Apply impulse in a list of triangles all at once considering the same impulse
2490 * values on @p x, @p y and @p z.
2491 *
2492 * @param body The body to apply impulse.
2493 * @param triangles A list of triangles indexes.
2494 * @param x The axis @p x component of impulse.
2495 * @param y The axis @p y component of impulse.
2496 * @param z The axis @p z component of impulse.
2497 *
2498 * @see ephysics_body_soft_body_triangle_impulse_apply() to see about impulse
2499 * applying on soft bodies.
2500 * @see ephysics_body_soft_body_triangles_inside_get().
2501 *
2502 * @ingroup EPhysics_Body
2503 */
2504EAPI void ephysics_body_soft_body_triangle_list_impulse_apply(EPhysics_Body *body, Eina_List *triangles, double x, double y, double z);
2505
2506/**
2507 * @brief
2458 * Set the soft body number of position iterations. 2508 * Set the soft body number of position iterations.
2459 * 2509 *
2460 * Both soft body and cloth can have its number of position iterations changed. 2510 * Both soft body and cloth can have its number of position iterations changed.