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

@@ -21,14 +21,15 @@ subject to the following restrictions:
void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
{
const btVector3& halfExtents = getHalfExtentsWithoutMargin();
btVector3 halfExtents = getHalfExtentsWithoutMargin();
halfExtents += btVector3(getMargin(),getMargin(),getMargin());
btMatrix3x3 abs_b = t.getBasis().absolute();
btPoint3 center = t.getOrigin();
btVector3 extent = btVector3(abs_b[0].dot(halfExtents),
abs_b[1].dot(halfExtents),
abs_b[2].dot(halfExtents));
extent += btVector3(getMargin(),getMargin(),getMargin());
aabbMin = center - extent;
aabbMax = center + extent;