diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2007-06-23 09:28:07 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2007-06-23 09:28:07 +0400 |
commit | ca26aeb7b23e37e65f49d907ea53fcaeee77ad4e (patch) | |
tree | b6530195a8ef5d874b9fc2bbb9574f1484781be5 /extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp | |
parent | 14ad8c9941ac1e6f5252a843c6ad17653cbbd689 (diff) |
upgrade to latest Bullet 2.53. cross the fingers it doesn't break one of the exotic or less exotic platforms
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp index b5f80de4557..636b0046c13 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btBoxShape.cpp @@ -42,17 +42,16 @@ void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabb void btBoxShape::calculateLocalInertia(btScalar mass,btVector3& inertia) { - //float margin = 0.f; + //btScalar margin = btScalar(0.); btVector3 halfExtents = getHalfExtents(); - btScalar lx=2.f*(halfExtents.x()); - btScalar ly=2.f*(halfExtents.y()); - btScalar lz=2.f*(halfExtents.z()); - - inertia[0] = mass/(12.0f) * (ly*ly + lz*lz); - inertia[1] = mass/(12.0f) * (lx*lx + lz*lz); - inertia[2] = mass/(12.0f) * (lx*lx + ly*ly); + btScalar lx=btScalar(2.)*(halfExtents.x()); + btScalar ly=btScalar(2.)*(halfExtents.y()); + btScalar lz=btScalar(2.)*(halfExtents.z()); + inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz), + mass/(btScalar(12.0)) * (lx*lx + lz*lz), + mass/(btScalar(12.0)) * (lx*lx + ly*ly)); } |