From 79cdf6dc3631a0f6a87addb473f3e936f3045949 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Fri, 2 Mar 2007 19:46:06 +0000 Subject: [PATCH] fixed get_rotation() to return a Mat3 instead of a vec3 --- panda/src/ode/odeBody.I | 8 +++++--- panda/src/ode/odeBody.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/panda/src/ode/odeBody.I b/panda/src/ode/odeBody.I index 12053dc18c..3cc9e57c3e 100755 --- a/panda/src/ode/odeBody.I +++ b/panda/src/ode/odeBody.I @@ -140,10 +140,12 @@ get_position() const { return LVecBase3f(res[0], res[1], res[2]); } -INLINE LVecBase3f OdeBody:: +INLINE LMatrix3f OdeBody:: get_rotation() const { - const dReal *res = dBodyGetRotation(_id); - return LVecBase3f(res[0], res[1], res[2]); + const dReal *rot = dBodyGetRotation(_id); + return LMatrix3f(rot[0], rot[1], rot[2], + rot[4], rot[5], rot[6], + rot[8], rot[9], rot[10]); } INLINE LVecBase4f OdeBody:: diff --git a/panda/src/ode/odeBody.h b/panda/src/ode/odeBody.h index 6681f63d3e..62b823a8fb 100755 --- a/panda/src/ode/odeBody.h +++ b/panda/src/ode/odeBody.h @@ -72,7 +72,7 @@ PUBLISHED: INLINE void* get_data() const; INLINE LVecBase3f get_position() const; - INLINE LVecBase3f get_rotation() const; + INLINE LMatrix3f get_rotation() const; INLINE LVecBase4f get_quaternion() const; INLINE LVecBase3f get_linear_vel() const; INLINE LVecBase3f get_angular_vel() const;