diff options
author | Leandro Dorileo <dorileo@profusion.mobi> | 2012-10-25 21:54:37 +0000 |
---|---|---|
committer | Bruno Dilly <bdilly@profusion.mobi> | 2012-10-25 21:54:37 +0000 |
commit | b0bd7beac3d86cd53e1f16ffedf2c49ed45f207a (patch) | |
tree | f5c62492f6627d192e8b4d5556b5c0f08b61b6bd /legacy/ephysics/src/lib/EPhysics.h | |
parent | a36065771888556b5ca0bc34681e0023363ae14a (diff) |
EPhysics: soft body position solver iterations
This patch introduces getters and setters API for setting the
soft body position solver iterations.
Patch by: Leandro Dorileo <dorileo@profusion.mobi>
SVN revision: 78486
Diffstat (limited to '')
-rw-r--r-- | legacy/ephysics/src/lib/EPhysics.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h index 2c40b7707b..5a7b2db9fe 100644 --- a/legacy/ephysics/src/lib/EPhysics.h +++ b/legacy/ephysics/src/lib/EPhysics.h | |||
@@ -1914,6 +1914,42 @@ EAPI int ephysics_body_soft_body_triangle_index_get(EPhysics_Body *body, Evas_Co | |||
1914 | 1914 | ||
1915 | /** | 1915 | /** |
1916 | * @brief | 1916 | * @brief |
1917 | * Set the soft body number of position iterations. | ||
1918 | * | ||
1919 | * Both soft body and cloth can have its number of position iterations changed. | ||
1920 | * The number of position iterations will change how many time the physics engine | ||
1921 | * will iterate the position solver, a greater value will change deformation | ||
1922 | * behaves and how hard the soft body looks like. The greater position iterations | ||
1923 | * the harder the soft body will be. | ||
1924 | * | ||
1925 | * @node For soft bodies the default value is set to 1, and for cloth it's set to | ||
1926 | * the number of rows / 5; | ||
1927 | * | ||
1928 | * @param body The body to be set. | ||
1929 | * @param iterations The number of iterations. | ||
1930 | * | ||
1931 | * @see ephysics_body_cloth_add() for more informations about cloth. | ||
1932 | * @see ephysics_body_soft_body_position_iterations_get(). | ||
1933 | * | ||
1934 | * @ingroup EPhysics_Body | ||
1935 | */ | ||
1936 | EAPI void ephysics_body_soft_body_position_iterations_set(EPhysics_Body *body, int iterations); | ||
1937 | |||
1938 | /** | ||
1939 | * @brief | ||
1940 | * Get the soft body number of position iterations. | ||
1941 | * | ||
1942 | * @param body The body to get the number os position iterations from. | ||
1943 | * @return The number of position solver iterations of a soft @p body. | ||
1944 | * | ||
1945 | * @see ephysics_body_soft_body_position_iterations_set(). | ||
1946 | * | ||
1947 | * @ingroup EPhysics_Body | ||
1948 | */ | ||
1949 | EAPI int ephysics_body_soft_body_position_iterations_get(EPhysics_Body *body); | ||
1950 | |||
1951 | /** | ||
1952 | * @brief | ||
1917 | * Move a body's triangle. | 1953 | * Move a body's triangle. |
1918 | * | 1954 | * |
1919 | * Move the triangle of @p idx of @p body to @p x, @p y and @p z. | 1955 | * Move the triangle of @p idx of @p body to @p x, @p y and @p z. |