collectPairs method
Collect overlaping pairs
Implementation
@override
void collectPairs() {
int i = 0, j;
Proxy p1, p2;
List<Proxy> px = proxies;
int l = px.length;//this.numProxies;
numPairChecks = l*(l-1)>>1;
//this.numPairChecks=this.numProxies*(this.numProxies-1)*0.5;
while(i < l){
p1 = px[i++];
j = i + 1;
while( j < l ){
p2 = px[j++];
if(p1.aabb.intersectTest( p2.aabb ) || !isAvailablePair(p1.shape, p2.shape)){
continue;
}
addPair( p1.shape, p2.shape );
}
}
}