BulletMultiThreaded needs to refreshContactPoint for contact manifold (this has been moved to the collision detector, instead of constraint solver)

BulletMultiThreaded support function for box shouldn't compensate for the collision margin anymore
This commit is contained in:
ejcoumans
2007-10-14 01:51:07 +00:00
parent 43b0ecd71a
commit ffcdb0f93d
7 changed files with 26 additions and 14 deletions

View File

@@ -170,6 +170,14 @@ void SpuContactResult::addContactPoint(const btVector3& normalOnBInWorld,const b
void SpuContactResult::flush()
{
if (m_spuManifold && m_spuManifold->getNumContacts())
{
m_spuManifold->refreshContactPoints(m_rootWorldTransform0,m_rootWorldTransform1);
m_RequiresWriteBack = true;
}
if (m_RequiresWriteBack)
{
#ifdef DEBUG_SPU_COLLISION_DETECTION

View File

@@ -48,9 +48,8 @@ inline btPoint3 localGetSupportingVertexWithoutMargin(int shapeType, void* shape
{
// spu_printf("SPU: getSupport BOX_SHAPE_PROXYTYPE\n");
btConvexInternalShape* convexShape = (btConvexInternalShape*)shape;
btVector3 halfExtents = convexShape->getImplicitShapeDimensions();
float margin = convexShape->getMarginNV();
halfExtents -= btVector3(margin,margin,margin);
const btVector3& halfExtents = convexShape->getImplicitShapeDimensions();
return btPoint3(
localDir.getX() < 0.0f ? -halfExtents.x() : halfExtents.x(),
localDir.getY() < 0.0f ? -halfExtents.y() : halfExtents.y(),