Search in sources :

Example 1 with BroadphasePair

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());
            }
        }
    }
}
Also used : Collidable(spacegraph.space3d.phys.Collidable) BroadphasePair(spacegraph.space3d.phys.collision.broad.BroadphasePair)

Aggregations

Collidable (spacegraph.space3d.phys.Collidable)1 BroadphasePair (spacegraph.space3d.phys.collision.broad.BroadphasePair)1