void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher) { initUnionFind( int (colWorld->getCollisionObjectArray().size())); // put the index into m_controllers into m_tag { int index = 0; int i; for (i=0;i<colWorld->getCollisionObjectArray().size(); i++) { btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i]; collisionObject->setIslandTag(index); collisionObject->setCompanionId(-1); collisionObject->setHitFraction(btScalar(1.)); index++; } } // do the union find findUnions(dispatcher,colWorld); }
void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher) { // put the index into m_controllers into m_tag int index = 0; { int i; for (i=0;i<colWorld->getCollisionObjectArray().size(); i++) { btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i]; //Adding filtering here if (!collisionObject->isStaticOrKinematicObject()) { collisionObject->setIslandTag(index++); } collisionObject->setCompanionId(-1); collisionObject->setHitFraction(btScalar(1.)); } } // do the union find initUnionFind( index ); findUnions(dispatcher,colWorld); }