Browse Source

test: fix an alignment issue with btVector3/vec3 casts.

legacy
Sam Hocevar sam 12 years ago
parent
commit
a492530c60
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      test/Physics/EasyPhysics.cpp
  2. +1
    -1
      test/Physics/LolBtPhysicsIntegration.h

+ 1
- 1
test/Physics/EasyPhysics.cpp View File

@@ -129,7 +129,7 @@ void EasyPhysics::SetMass(float mass)
if (m_rigid_body)
{
SetLocalInertia(m_mass);
m_rigid_body->setMassProps(mass, LOL2BT_VEC3(m_local_inertia));
m_rigid_body->setMassProps(mass, m_local_inertia);
}
}



+ 1
- 1
test/Physics/LolBtPhysicsIntegration.h View File

@@ -26,7 +26,7 @@ namespace lol
#define LOL2BT_SIZE 0.5f
#define BT2LOL_SIZE 2.0f

#define LOL2BT_VEC3(ELEMENT) (*(btVector3*)(&(ELEMENT)))
#define LOL2BT_VEC3(ELEMENT) btVector3((ELEMENT).x, (ELEMENT).y, (ELEMENT).z)
#define BT2LOL_VEC3(ELEMENT) (*(lol::vec3*)(&(ELEMENT)))

#define LOL2BT_QUAT(ELEMENT) btQuaternion((ELEMENT).x, (ELEMENT).y, (ELEMENT).z, (ELEMENT).w)


Loading…
Cancel
Save