function warn(msg){
    if(numWarnings > maxWarnings){
        return;
    }

    numWarnings++;

    console.warn(msg);
}
Generate all contacts between a list of body pairs
@method getContacts
@param {array} p1 Array of body indices
@param {array} p2 Array of body indices
@param {World} world
@param {array} result Array to store generated contacts
@param {array} oldcontacts Optional. Array of reusable contact objects