fixed get_rotation() to return a Mat3 instead of a vec3

This commit is contained in:
Josh Wilson 2007-03-02 19:46:06 +00:00
parent 9e1f6e25c5
commit 79cdf6dc36
2 changed files with 6 additions and 4 deletions

View File

@ -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::

View File

@ -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;