summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/lib/EPhysics.h
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2012-10-16 23:18:21 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-16 23:18:21 +0000
commit56bdc31570d5e4188082324f5fb951d032d5d15c (patch)
tree3202d33469ac4924fb3e1aa100fb7af48bdb3dce /legacy/ephysics/src/lib/EPhysics.h
parentf4fa980cce7a49dbd499900f69c369d142b857e8 (diff)
EPhysics: soft body dragging support
This patch introduces an API to freeze(dragging_set) an specific soft body trimesh face untill it gets called to unfreeze(dragging_unset) it. Patch by: Leandro Dorileo <dorileo@profusion.mobi> SVN revision: 78091
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index 63164f6205..3f9035fe75 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -1764,6 +1764,44 @@ EAPI double ephysics_body_soft_body_hardness_get(const EPhysics_Body *body);
1764 1764
1765/** 1765/**
1766 * @brief 1766 * @brief
1767 * Set the soft body dragging status.
1768 *
1769 * While dragging a soft body the user may want to freeze a specific trimesh
1770 * face, after calling this function EPhysics will do freeze the @p triangle
1771 * untill it gets a call to unset it with
1772 * ephysics_body_soft_body_dragging_unset().
1773 *
1774 * @note Freezing a specific trimesh face means no forces are applied to it, no
1775 * gravity enforced, that's @p triangle will have no mass untill it dragging gets
1776 * unset.
1777 *
1778 * @param body The body of interest.
1779 * @param triangle The triangle to freeze.
1780 *
1781 * @see ephysics_body_soft_body_dragging_unset().
1782 * @see ephysics_body_soft_body_triangle_index_get().
1783 *
1784 * @ingroup EPhysics_Body
1785 */
1786EAPI void ephysics_body_soft_body_dragging_set(EPhysics_Body *body, int triangle);
1787
1788/**
1789 * @brief
1790 * Unset the soft body dragging status.
1791 *
1792 * This function will tell EPhysics to not freeze - the previously dragging
1793 * triangle set - any more.
1794 *
1795 * @param body The body to unset the dragging status.
1796 *
1797 * @see ephysics_body_soft_body_dragging_set() for dragging details.
1798 *
1799 * @ingroup EPhysics_Body
1800 */
1801EAPI void ephysics_body_soft_body_dragging_unset(EPhysics_Body *body);
1802
1803/**
1804 * @brief
1767 * Get the triangle index of a soft body in @p x and @p y. 1805 * Get the triangle index of a soft body in @p x and @p y.
1768 * 1806 *
1769 * Given a point in @p x and @p y a ray cast is performed and if a triangle is 1807 * Given a point in @p x and @p y a ray cast is performed and if a triangle is