Parallel pair checks

radioactiveman
Posts: 3
Joined: Thu Nov 29, 2012 1:10 pm

Parallel pair checks

Post by radioactiveman »

Hi,

since ages I try to get my pair checks run in parallel. From the btCollisionWorld I use the contactPairTest. I nearly tried everything starting from using one callback or one for each check, never using the same objects the same time and so on. Bullet always crashes but at different times and positions which points clearly to a racing condition. It also works for all pair checks consecutively.
This is how I create my world:

Code: Select all

  m_CollisionConfiguration = new btDefaultCollisionConfiguration();
  m_Dispatcher = new btCollisionDispatcher(m_CollisionConfiguration);

  btVector3 worldAabbMin(-FLT_MAX,-FLT_MAX,-FLT_MAX);
  btVector3 worldAabbMax(FLT_MAX,FLT_MAX,FLT_MAX);
  m_Broadphase = new bt32BitAxisSweep3(worldAabbMin,worldAabbMax);

  m_CollisionWorld = new btCollisionWorld(m_Dispatcher, m_Broadphase, m_CollisionConfiguration);
  m_Dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE, GIMPACT_SHAPE_PROXYTYPE, new GImpactCollisionAlgorithm::CreateFunc);
so nothing special here. The only thing I changed for the algorithm is that it stops after the first colliding triangle because I only need a bool decision. But it also does not work for non colliding checks.

Can anyone point me to the piece of code where the problem might be for parallel pair checks?

Thanks in advance,
radioactiveman