summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/lib/EPhysics.h
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2012-12-03 21:29:30 +0000
committerLeandro Dorileo <dorileo@profusion.mobi>2012-12-03 21:29:30 +0000
commitd449396bed3023de121a581397cc21ea0481e4e5 (patch)
treeb7b7cbaf50eb9b0d6780a022ac267b2c6d2cf2e6 /legacy/ephysics/src/lib/EPhysics.h
parentff57aea85321f9ec6411dcb5228162cf3801b51d (diff)
EPhysics: anchor hardness api and small fixes
This patch introduces a separeted API for handling with anchor hardness, and fixes small problems with pose and soft body impulses. --This line, and those below, will be ignored-- SVN revision: 80107
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index affac90c14..1675fe3da4 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -2332,6 +2332,46 @@ EAPI double ephysics_body_soft_body_hardness_get(const EPhysics_Body *body);
2332 2332
2333/** 2333/**
2334 * @brief 2334 * @brief
2335 * Set the soft body anchor hardness percentage.
2336 *
2337 * The anchor hardness percentage(together with general hardness settings
2338 * set with ephysics_body_soft_body_hardness_set()) will define how the soft
2339 * body is supposed to deform.
2340 *
2341 * By default EPhysics will calculate the anchor hardness depending on the
2342 * general hardness settings, by default it`s set to 70% of general hardness on
2343 * soft body and a fixed 80% for cloths.
2344 *
2345 * Anchor hardness will result on a contrary force to impulse and velocities
2346 * applied to soft bodies. So it implies on force reduction.
2347 *
2348 * @note Since it`s a percentage value @p hardness will range from 0 - 100.
2349 *
2350 * @param body The body to be set.
2351 * @param hardness The hardness to be set to @p body.
2352 *
2353 * @see ephysics_body_soft_body_hardness_set() for general hardness.
2354 * @see ephysics_body_soft_body_anchor_hardness_get().
2355 *
2356 * @ingroup EPhysics_Body
2357 */
2358EAPI void ephysics_body_soft_body_anchor_hardness_set(EPhysics_Body *body, double hardness);
2359
2360/**
2361 * @brief
2362 * Get the soft body anchor hardnees percentage.
2363 *
2364 * @param body The body to get the anchor hardness percentage from.
2365 * @return The anchor hardness percentage on success -1 on failure.
2366 *
2367 * @see ephysics_body_soft_body_anchor_hardness_set().
2368 *
2369 * @ingroup EPhysics_Body
2370 */
2371EAPI double ephysics_body_soft_body_anchor_hardness_get(EPhysics_Body *body);
2372
2373/**
2374 * @brief
2335 * Set the soft body dragging status. 2375 * Set the soft body dragging status.
2336 * 2376 *
2337 * While dragging a soft body the user may want to freeze a specific trimesh 2377 * While dragging a soft body the user may want to freeze a specific trimesh