diff options
author | Peter Klimenko <peterklimk@outlook.com> | 2020-07-31 11:45:15 +0300 |
---|---|---|
committer | Peter Klimenko <peterklimk@outlook.com> | 2020-07-31 11:45:15 +0300 |
commit | 97a4a8d0fb7fd9ac34f9f5d4d5a0689c01235e14 (patch) | |
tree | fc9746d2210eda08be9d44ae67d5e58d64b48b40 /extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp | |
parent | 4a7c203e9ecc7c5b0370afc0fdd6bcc183dc00df (diff) | |
parent | f3e8326453ae856d7914e45e832a2ed80aa9a9b9 (diff) |
merge
Diffstat (limited to 'extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp')
-rw-r--r-- | extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp index 9095c592d87..b831e20c2f9 100644 --- a/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp +++ b/extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp @@ -406,17 +406,17 @@ void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& ine #ifndef __SPU__ //not yet, return box inertia - btScalar margin = getMargin(); + //btScalar margin = getMargin(); btTransform ident; ident.setIdentity(); btVector3 aabbMin,aabbMax; - getAabb(ident,aabbMin,aabbMax); + getAabb(ident,aabbMin,aabbMax); // This already contains the margin btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5); - btScalar lx=btScalar(2.)*(halfExtents.x()+margin); - btScalar ly=btScalar(2.)*(halfExtents.y()+margin); - btScalar lz=btScalar(2.)*(halfExtents.z()+margin); + btScalar lx=btScalar(2.)*(halfExtents.x()); + btScalar ly=btScalar(2.)*(halfExtents.y()); + btScalar lz=btScalar(2.)*(halfExtents.z()); const btScalar x2 = lx*lx; const btScalar y2 = ly*ly; const btScalar z2 = lz*lz; @@ -476,10 +476,10 @@ void btPolyhedralConvexAabbCachingShape::recalcLocalAabb() for ( int i = 0; i < 3; ++i ) { - m_localAabbMax[i] = _supporting[i][i] + m_collisionMargin; - m_localAabbMin[i] = _supporting[i + 3][i] - m_collisionMargin; + m_localAabbMax[i] = _supporting[i][i]; + m_localAabbMin[i] = _supporting[i + 3][i]; } - + #else for (int i=0;i<3;i++) |