瀏覽代碼

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

legacy
Sam Hocevar sam 12 年之前
父節點
當前提交
a492530c60
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      test/Physics/EasyPhysics.cpp
  2. +1
    -1
      test/Physics/LolBtPhysicsIntegration.h

+ 1
- 1
test/Physics/EasyPhysics.cpp 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存