use of spacegraph.space3d.phys.collision.broad.BroadphasePair in project narchy by automenta.
the class Islands method findUnions.
public void findUnions(Collisions colWorld) {
FasterList<BroadphasePair> pairPtr = colWorld.pairs().getOverlappingPairArray();
int n = pairPtr.size();
for (int i = 0; i < n; i++) {
// return array[index];
BroadphasePair collisionPair = pairPtr.get(i);
Collidable colObj0 = collisionPair.pProxy0.data;
if (colObj0 != null && ((colObj0).mergesSimulationIslands())) {
Collidable colObj1 = collisionPair.pProxy1.data;
if (colObj1 != null && ((colObj1).mergesSimulationIslands())) {
find.unite((colObj0).tag(), (colObj1).tag());
}
}
}
}
Aggregations