Changeset 1611


Ignore:
Timestamp:
Jul 9, 2012, 2:03:12 PM (8 years ago)
Author:
sam
Message:

test: fix Bullet/Lol quaternion conversions, they use [x y z w] whereas we use
the mathematician-friendly [w x y z].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Physics/LolBtPhysicsIntegration.h

    r1591 r1611  
    3030#define BT2LOL_VEC3(ELEMENT)    (*(lol::vec3*)(&(ELEMENT)))
    3131
    32 #define LOL2BT_QUAT(ELEMENT)    (*(btQuaternion*)(&(ELEMENT)))
    33 #define BT2LOL_QUAT(ELEMENT)    (*(lol::quat*)(&(ELEMENT)))
     32#define LOL2BT_QUAT(ELEMENT)    btQuaternion((ELEMENT).x, (ELEMENT).y, (ELEMENT).z, (ELEMENT).w)
     33#define BT2LOL_QUAT(ELEMENT)    lol::quat((ELEMENT).getW(), BT2LOL_VEC3((ELEMENT).getAxis())
    3434
    3535} /* namespace lol */
Note: See TracChangeset for help on using the changeset viewer.