50 if (numOverlappingPairs)
54 for (
int i=0;i<numOverlappingPairs;i++)
60 if (((colObj0) && ((colObj0)->mergesSimulationIslands())) &&
61 ((colObj1) && ((colObj1)->mergesSimulationIslands())))
65 (colObj1)->getIslandTag());
72 #ifdef STATIC_SIMULATION_ISLAND_OPTIMIZATION
126 #else //STATIC_SIMULATION_ISLAND_OPTIMIZATION
177 #endif //STATIC_SIMULATION_ISLAND_OPTIMIZATION
218 int endIslandIndex=1;
219 int startIslandIndex;
223 for ( startIslandIndex=0;startIslandIndex<numElem;startIslandIndex = endIslandIndex)
226 for (endIslandIndex = startIslandIndex+1;(endIslandIndex<numElem) && (
getUnionFind().getElement(endIslandIndex).m_id == islandId);endIslandIndex++)
232 bool allSleeping =
true;
235 for (idx=startIslandIndex;idx<endIslandIndex;idx++)
263 for (idx=startIslandIndex;idx<endIslandIndex;idx++)
283 for (idx=startIslandIndex;idx<endIslandIndex;idx++)
318 for (i=0;i<maxNumManifolds ;i++)
360 int endIslandIndex=1;
361 int startIslandIndex;
370 callback->
processIsland(&collisionObjects[0],collisionObjects.
size(),manifold,maxNumManifolds, -1);
387 int startManifoldIndex = 0;
388 int endManifoldIndex = 1;
397 for ( startIslandIndex=0;startIslandIndex<numElem;startIslandIndex = endIslandIndex)
402 bool islandSleeping =
true;
404 for (endIslandIndex = startIslandIndex;(endIslandIndex<numElem) && (
getUnionFind().getElement(endIslandIndex).m_id == islandId);endIslandIndex++)
410 islandSleeping =
false;
415 int numIslandManifolds = 0;
418 if (startManifoldIndex<numManifolds)
421 if (curIslandId == islandId)
425 for (endManifoldIndex = startManifoldIndex+1;(endManifoldIndex<numManifolds) && (islandId ==
getIslandId(
m_islandmanifold[endManifoldIndex]));endManifoldIndex++)
430 numIslandManifolds = endManifoldIndex-startManifoldIndex;
441 if (numIslandManifolds)
443 startManifoldIndex = endManifoldIndex;
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
void push_back(const T &_Val)
void sortIslands()
this is a special operation, destroying the content of btUnionFind.
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
int getIslandId(const btPersistentManifold *lhs)
virtual btPersistentManifold * getManifoldByIndexInternal(int index)=0
btAlignedObjectArray< btCollisionObject * > m_islandBodies
function object that routes calls to operator<
btOverlappingPairCache * getPairCache()
btElement & getElement(int index)
void buildAndProcessIslands(btDispatcher *dispatcher, btCollisionWorld *collisionWorld, IslandCallback *callback)
void setHitFraction(btScalar hitFraction)
btCollisionObjectArray & getCollisionObjectArray()
#define SIMD_FORCE_INLINE
const btCollisionObject * getBody0() const
void buildIslands(btDispatcher *dispatcher, btCollisionWorld *colWorld)
virtual void updateActivationState(btCollisionWorld *colWorld, btDispatcher *dispatcher)
btSimulationIslandManager()
bool hasContactResponse() const
The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
void setActivationState(int newState) const
int size() const
return the number of elements in the array
bool isKinematicObject() const
bool isStaticOrKinematicObject() const
btCollisionObject can be used to manage collision detection objects.
void setDeactivationTime(btScalar time)
void initUnionFind(int n)
void setCompanionId(int id)
virtual int getNumOverlappingPairs() const =0
btBroadphaseProxy * m_pProxy1
virtual btPersistentManifold ** getInternalManifoldPointer()=0
void activate(bool forceActivation=false) const
bool operator()(const btPersistentManifold *lhs, const btPersistentManifold *rhs) const
btBroadphaseProxy * m_pProxy0
virtual int getNumManifolds() const =0
CollisionWorld is interface and container for the collision detection.
virtual void processIsland(btCollisionObject **bodies, int numBodies, class btPersistentManifold **manifolds, int numManifolds, int islandId)=0
#define WANTS_DEACTIVATION
void resize(int newsize, const T &fillData=T())
void setIslandTag(int tag)
virtual void storeIslandActivationState(btCollisionWorld *world)
btAlignedObjectArray< btPersistentManifold * > m_islandmanifold
virtual bool needsResponse(const btCollisionObject *body0, const btCollisionObject *body1)=0
#define DISABLE_DEACTIVATION
btUnionFind & getUnionFind()
int getNumElements() const
virtual btBroadphasePair * getOverlappingPairArrayPtr()=0
The btDispatcher interface class can be used in combination with broadphase to dispatch calculations ...
int getActivationState() const
const btCollisionObject * getBody1() const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
void quickSort(const L &CompareFunc)
void findUnions(btDispatcher *dispatcher, btCollisionWorld *colWorld)
virtual ~btSimulationIslandManager()
The btBroadphasePair class contains a pair of aabb-overlapping objects.