summaryrefslogtreecommitdiff
path: root/legacy/ephysics/src/lib/EPhysics.h
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2012-10-15 21:53:56 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-15 21:53:56 +0000
commit66b8ca8afcd5e061955d3bad60f2dcef42fce8d6 (patch)
tree1d76094519c37a92d8ed7338c620cf1328be92d4 /legacy/ephysics/src/lib/EPhysics.h
parent05dab66b0b82b69e14e6e98a155d597e93d4d7a8 (diff)
ephysics: implement rotation quartenion getter
So it's possible to create a custom body update callback using it with evas_map_util_quat_rotate(). SVN revision: 78010
Diffstat (limited to '')
-rw-r--r--legacy/ephysics/src/lib/EPhysics.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/legacy/ephysics/src/lib/EPhysics.h b/legacy/ephysics/src/lib/EPhysics.h
index dc10eb38af..04cb54e1cd 100644
--- a/legacy/ephysics/src/lib/EPhysics.h
+++ b/legacy/ephysics/src/lib/EPhysics.h
@@ -2924,6 +2924,7 @@ EAPI void ephysics_body_linear_movement_enable_get(const EPhysics_Body *body, Ei
2924 * @param rot_z The amount of degrees @p body is rotated on z axis. 2924 * @param rot_z The amount of degrees @p body is rotated on z axis.
2925 * 2925 *
2926 * @see ephysics_body_rotation_set() 2926 * @see ephysics_body_rotation_set()
2927 * @see ephysics_body_rotation_quaternion_get()
2927 * 2928 *
2928 * @ingroup EPhysics_Body 2929 * @ingroup EPhysics_Body
2929 */ 2930 */
@@ -2951,6 +2952,24 @@ EAPI void ephysics_body_rotation_set(EPhysics_Body *body, double rot_x, double r
2951 2952
2952/** 2953/**
2953 * @brief 2954 * @brief
2955 * Get body's normalized rotation quaternion (x, y, z and w).
2956 *
2957 * @param body The physics body.
2958 * @param x the x component of the imaginary part of the quaternion.
2959 * @param y the y component of the imaginary part of the quaternion.
2960 * @param z the z component of the imaginary part of the quaternion.
2961 * @param w the w component of the real part of the quaternion.
2962 *
2963 * @see ephysics_body_rotation_set()
2964 * @see ephysics_body_rotation_get()
2965 *
2966 * @ingroup EPhysics_Body
2967 */
2968EAPI void
2969ephysics_body_rotation_quaternion_get(const EPhysics_Body *body, double *x, double *y, double *z, double *w);
2970
2971/**
2972 * @brief
2954 * Set data to @p body. 2973 * Set data to @p body.
2955 * 2974 *
2956 * If a previous data was set, it's reference will be lost and body 2975 * If a previous data was set, it's reference will be lost and body
@@ -3169,7 +3188,7 @@ EAPI void ephysics_body_forces_clear(EPhysics_Body *body);
3169 * 3188 *
3170 * If a body of width = 30, height = 20 and depth = 20, and has the center of 3189 * If a body of width = 30, height = 20 and depth = 20, and has the center of
3171 * mass at x component = 20, y component = 10 and z = 10, it will return 3190 * mass at x component = 20, y component = 10 and z = 10, it will return
3172 * @p x = 0.666, @p y = 0.5 and @z = 0.5. 3191 * @p x = 0.666, @p y = 0.5 and @p z = 0.5.
3173 * 3192 *
3174 * For primitive shapes, like box and circle, the center of mass 3193 * For primitive shapes, like box and circle, the center of mass
3175 * is (0.5, 0.5, 0.5). 3194 * is (0.5, 0.5, 0.5).