summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/lib/EPhysics.h
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-10-10 19:17:36 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-10 19:17:36 +0000
commita1897ddf578417e6bca3a193b1839a0355c91b67 (patch)
tree30cfc336fad60dbe3aca364e530bc5e76624074a /legacy/ephysics/src/lib/EPhysics.h
parent71583d30e3bf8b32d1b8183ac7b764893aa90b24 (diff)
ephysics: impulses support the 3 planes
SVN revision: 77780
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index 99bd96e126..63526c28e9 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -2626,7 +2626,7 @@ EAPI double ephysics_body_friction_get(const EPhysics_Body *body);
2626 * After a impulse of 30 kg * p / s in the same direction is applied, 2626 * After a impulse of 30 kg * p / s in the same direction is applied,
2627 * the velocity will be * 45 p/s. 2627 * the velocity will be * 45 p/s.
2628 * 2628 *
2629 * (0, 30) + (0, 300) / 2 = (0, 30) + (0, 15) = (0, 45) 2629 * (0, 30, 0) + (0, 300, 0) / 2 = (0, 30, 0) + (0, 15, 0) = (0, 45, 0)
2630 * 2630 *
2631 * When a impulse is applied over a body, it will has its velocity changed. 2631 * When a impulse is applied over a body, it will has its velocity changed.
2632 * This impulse will be applied on body's center, so it won't implies in 2632 * This impulse will be applied on body's center, so it won't implies in
@@ -2638,13 +2638,14 @@ EAPI double ephysics_body_friction_get(const EPhysics_Body *body);
2638 * @param body The physics body that will receive the impulse. 2638 * @param body The physics body that will receive the impulse.
2639 * @param x The axis x component of impulse. 2639 * @param x The axis x component of impulse.
2640 * @param y The axis y component of impulse. 2640 * @param y The axis y component of impulse.
2641 * @param z The axis z component of impulse.
2641 * 2642 *
2642 * @see ephysics_body_torque_impulse_apply(). 2643 * @see ephysics_body_torque_impulse_apply().
2643 * @see ephysics_body_impulse_apply(). 2644 * @see ephysics_body_impulse_apply().
2644 * 2645 *
2645 * @ingroup EPhysics_Body 2646 * @ingroup EPhysics_Body
2646 */ 2647 */
2647EAPI void ephysics_body_central_impulse_apply(EPhysics_Body *body, double x, double y); 2648EAPI void ephysics_body_central_impulse_apply(EPhysics_Body *body, double x, double y, double z);
2648 2649
2649/** 2650/**
2650 * @brief 2651 * @brief
@@ -2657,6 +2658,10 @@ EAPI void ephysics_body_central_impulse_apply(EPhysics_Body *body, double x, dou
2657 * torque impulse and body's inertia. 2658 * torque impulse and body's inertia.
2658 * 2659 *
2659 * @param body The physics body that will receive the impulse. 2660 * @param body The physics body that will receive the impulse.
2661 * @param pitch Impulse to rotate body around Z axis (rotate on y - z plane).
2662 * Negative values will impulse body on counter clockwise rotation.
2663 * @param yaw Impulse to rotate body around Y axis (rotate on x - z plane).
2664 * Negative values will impulse body on counter clockwise rotation.
2660 * @param roll Impulse to rotate body around Z axis (rotate on x - y plane). 2665 * @param roll Impulse to rotate body around Z axis (rotate on x - y plane).
2661 * Negative values will impulse body on counter clockwise rotation. 2666 * Negative values will impulse body on counter clockwise rotation.
2662 * 2667 *
@@ -2665,7 +2670,7 @@ EAPI void ephysics_body_central_impulse_apply(EPhysics_Body *body, double x, dou
2665 * 2670 *
2666 * @ingroup EPhysics_Body 2671 * @ingroup EPhysics_Body
2667 */ 2672 */
2668EAPI void ephysics_body_torque_impulse_apply(EPhysics_Body *body, double roll); 2673EAPI void ephysics_body_torque_impulse_apply(EPhysics_Body *body, double pitch, double yaw, double roll);
2669 2674
2670/** 2675/**
2671 * @brief 2676 * @brief
@@ -2688,8 +2693,10 @@ EAPI void ephysics_body_torque_impulse_apply(EPhysics_Body *body, double roll);
2688 * @param body The physics body that will receive the impulse. 2693 * @param body The physics body that will receive the impulse.
2689 * @param x The axis x component of impulse. 2694 * @param x The axis x component of impulse.
2690 * @param y The axis y component of impulse. 2695 * @param y The axis y component of impulse.
2696 * @param z The axis z component of impulse.
2691 * @param pos_x The axis x component of the relative position to apply impulse. 2697 * @param pos_x The axis x component of the relative position to apply impulse.
2692 * @param pos_y The axis y component of the relative position to apply impulse. 2698 * @param pos_y The axis y component of the relative position to apply impulse.
2699 * @param pos_z The axis z component of the relative position to apply impulse.
2693 * 2700 *
2694 * @note Impulse is measured in kg * p / s and position in pixels 2701 * @note Impulse is measured in kg * p / s and position in pixels
2695 * (Evas coordinates). 2702 * (Evas coordinates).
@@ -2699,7 +2706,7 @@ EAPI void ephysics_body_torque_impulse_apply(EPhysics_Body *body, double roll);
2699 * 2706 *
2700 * @ingroup EPhysics_Body 2707 * @ingroup EPhysics_Body
2701 */ 2708 */
2702EAPI void ephysics_body_impulse_apply(EPhysics_Body *body, double x, double y, Evas_Coord pos_x, Evas_Coord pos_y); 2709EAPI 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);
2703 2710
2704/** 2711/**
2705 * @brief 2712 * @brief