45 if (numOverlappingPairs)
49 for (
int i = 0; i < numOverlappingPairs; i++)
55 if (((colObj0) && ((colObj0)->mergesSimulationIslands())) &&
56 ((colObj1) && ((colObj1)->mergesSimulationIslands())))
59 (colObj1)->getIslandTag());
66#ifdef STATIC_SIMULATION_ISLAND_OPTIMIZATION
210 int endIslandIndex = 1;
211 int startIslandIndex;
214 for (startIslandIndex = 0; startIslandIndex < numElem; startIslandIndex = endIslandIndex)
217 for (endIslandIndex = startIslandIndex + 1; (endIslandIndex < numElem) && (
getUnionFind().
getElement(endIslandIndex).m_id == islandId); endIslandIndex++)
223 bool allSleeping =
true;
226 for (idx = startIslandIndex; idx < endIslandIndex; idx++)
251 for (idx = startIslandIndex; idx < endIslandIndex; idx++)
271 for (idx = startIslandIndex; idx < endIslandIndex; idx++)
304 for (i = 0; i < maxNumManifolds; i++)
352 int endIslandIndex = 1;
353 int startIslandIndex;
362 callback->
processIsland(&collisionObjects[0], collisionObjects.
size(), manifold, maxNumManifolds, -1);
389 int startManifoldIndex = 0;
390 int endManifoldIndex = 1;
397 for (startIslandIndex = 0; startIslandIndex < numElem; startIslandIndex = endIslandIndex)
401 bool islandSleeping =
true;
403 for (endIslandIndex = startIslandIndex; (endIslandIndex < numElem) && (
getUnionFind().
getElement(endIslandIndex).m_id == islandId); endIslandIndex++)
409 islandSleeping =
false;
413 int numIslandManifolds = 0;
416 if (startManifoldIndex < numManifolds)
419 if (curIslandId == islandId)
423 for (endManifoldIndex = startManifoldIndex + 1; (endManifoldIndex < numManifolds) && (islandId ==
getIslandId(
m_islandmanifold[endManifoldIndex])); endManifoldIndex++)
427 numIslandManifolds = endManifoldIndex - startManifoldIndex;
437 if (numIslandManifolds)
439 startManifoldIndex = endManifoldIndex;
static void getElement(int arrayLen, const char *cur, const char *old, char *oldPtr, char *curData)
#define DISABLE_DEACTIVATION
#define WANTS_DEACTIVATION
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define SIMD_FORCE_INLINE
int getIslandId(const btPersistentManifold *lhs)
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
int size() const
return the number of elements in the array
void resize(int newsize, const T &fillData=T())
void quickSort(const L &CompareFunc)
void push_back(const T &_Val)
btCollisionObject can be used to manage collision detection objects.
bool isStaticOrKinematicObject() const
btBroadphaseProxy * getBroadphaseHandle()
bool hasContactResponse() const
void activate(bool forceActivation=false) const
void setActivationState(int newState) const
void setCompanionId(int id)
bool isKinematicObject() const
void setDeactivationTime(btScalar time)
void setIslandTag(int tag)
void setHitFraction(btScalar hitFraction)
int getActivationState() const
CollisionWorld is interface and container for the collision detection.
btDispatcherInfo & getDispatchInfo()
btOverlappingPairCache * getPairCache()
btCollisionObjectArray & getCollisionObjectArray()
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
virtual int getNumManifolds() const =0
virtual btPersistentManifold * getManifoldByIndexInternal(int index)=0
virtual bool needsResponse(const btCollisionObject *body0, const btCollisionObject *body1)=0
virtual btPersistentManifold ** getInternalManifoldPointer()=0
The btOverlappingPairCache provides an interface for overlapping pair management (add,...
virtual int getNumOverlappingPairs() const =0
virtual btBroadphasePair * getOverlappingPairArrayPtr()=0
bool operator()(const btPersistentManifold *lhs, const btPersistentManifold *rhs) const
function object that routes calls to operator<
bool operator()(const btPersistentManifold *lhs, const btPersistentManifold *rhs) const
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
const btCollisionObject * getBody0() const
const btCollisionObject * getBody1() const
int getNumContacts() const
virtual void storeIslandActivationState(btCollisionWorld *world)
void findUnions(btDispatcher *dispatcher, btCollisionWorld *colWorld)
void processIslands(btDispatcher *dispatcher, btCollisionWorld *collisionWorld, IslandCallback *callback)
virtual void updateActivationState(btCollisionWorld *colWorld, btDispatcher *dispatcher)
btAlignedObjectArray< btCollisionObject * > m_islandBodies
void buildAndProcessIslands(btDispatcher *dispatcher, btCollisionWorld *collisionWorld, IslandCallback *callback)
btUnionFind & getUnionFind()
void initUnionFind(int n)
btAlignedObjectArray< btPersistentManifold * > m_islandmanifold
btSimulationIslandManager()
void buildIslands(btDispatcher *dispatcher, btCollisionWorld *colWorld)
virtual ~btSimulationIslandManager()
int getNumElements() const
btElement & getElement(int index)
void sortIslands()
this is a special operation, destroying the content of btUnionFind.
The btBroadphasePair class contains a pair of aabb-overlapping objects.
btBroadphaseProxy * m_pProxy1
btBroadphaseProxy * m_pProxy0
bool m_deterministicOverlappingPairs
virtual void processIsland(btCollisionObject **bodies, int numBodies, class btPersistentManifold **manifolds, int numManifolds, int islandId)=0