lib/Oimo.js
function(s1,s2){
        var b1=s1.parent;
        var b2=s2.parent;
        if( b1==b2 || // same parents
            (!b1.isDynamic&&!b2.isDynamic) || // static or kinematic object
            (s1.belongsTo&s2.collidesWith)==0 ||
             (s2.belongsTo&s1.collidesWith)==0 // collision filtering
        ){ return false; }
        var js;
        if(b1.numJoints<b2.numJoints) js=b1.jointLink;
        else js=b2.jointLink;
        while(js!=null){
           var joint=js.joint;
           if( !joint.allowCollision && (joint.body1==b1&&joint.body2==b2 || joint.body1==b2&&joint.body2==b1) ){ return false; }
           js=js.next;
        }
        return true;
    }
function(s1,s2){
        var b1=s1.parent;
        var b2=s2.parent;
        if( b1==b2 || // same parents
            (!b1.isDynamic&&!b2.isDynamic) || // static or kinematic object
            (s1.belongsTo&s2.collidesWith)==0 ||
             (s2.belongsTo&s1.collidesWith)==0 // collision filtering
        ){ return false; }
        var js;
        if(b1.numJoints<b2.numJoints) js=b1.jointLink;
        else js=b2.jointLink;
        while(js!=null){
           var joint=js.joint;
           if( !joint.allowCollision && (joint.body1==b1&&joint.body2==b2 || joint.body1==b2&&joint.body2==b1) ){ return false; }
           js=js.next;
        }
        return true;
    }
function ( s1 , s2 ) { var b1 = s1 . parent ; var b2 = s2 . parent ; if ( b1 == b2 || // same parents ( ! b1 . isDynamic && ! b2 . isDynamic ) || // static or kinematic object ( s1 . belongsTo & s2 . collidesWith ) == 0 || ( s2 . belongsTo & s1 . collidesWith ) == 0 // collision filtering ) { return false ; } var js ; if ( b1 . numJoints < b2 . numJoints ) js = b1 . jointLink ; else js = b2 . jointLink ; while ( js != null ) { var joint = js . joint ; if ( ! joint . allowCollision && ( joint . body1 == b1 && joint . body2 == b2 || joint . body1 == b2 && joint . body2 == b1 ) ) { return false ; } js = js . next ; } return true ; }
Returns whether the pair is available or not.
@param   s1
@param   s2
@return
Returns whether the pair is available or not .