Explorar el Código

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

legacy
Sam Hocevar sam hace 12 años
padre
commit
a492530c60
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. +1
    -1
      test/Physics/EasyPhysics.cpp
  2. +1
    -1
      test/Physics/LolBtPhysicsIntegration.h

+ 1
- 1
test/Physics/EasyPhysics.cpp Ver fichero

@@ -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 Ver fichero

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


Cargando…
Cancelar
Guardar