Calculation of bounding box: margins should be added before basis transform.

Disable btSphereBoxCollisionAlgorithm, it is broken.
More fixes for btSimpleBroadphase
Moved quickstep to Extras/quickstep folder, so developers don't get confused which constraint solver is default.
This commit is contained in:
erwin.coumans
2008-09-04 22:53:24 +00:00
parent 5334611f48
commit d8a5bf2c9c
29 changed files with 54 additions and 51 deletions

View File

@@ -112,6 +112,7 @@ void btCompoundShape::recalculateLocalAabb()
void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
{
btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin);
localHalfExtents += btVector3(getMargin(),getMargin(),getMargin());
btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin);
btMatrix3x3 abs_b = trans.getBasis().absolute();
@@ -121,10 +122,7 @@ void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVect
btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents),
abs_b[1].dot(localHalfExtents),
abs_b[2].dot(localHalfExtents));
extent += btVector3(getMargin(),getMargin(),getMargin());
aabbMin = center - extent;
aabbMax = center + extent;
}
void btCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const