src/Tools/babylon.earcut.js
// check if a polygon diagonal intersects any polygon segments
check if a polygon diagonal intersects any polygon segments
check if a polygon diagonal intersects any polygon segments
function intersectsPolygon(a, b) {
        var p = a;
        do {
            if (p.i !== a.i &&
                p.next.i !== a.i &&
                p.i !== b.i &&
                p.next.i !== b.i &&
                intersects(p, p.next, a, b))
                return true;
            p = p.next;
        } while (p !== a);
        return false;
    }
function intersectsPolygon ( a , b ) { var p = a ; do { if ( p . i !== a . i && p . next . i !== a . i && p . i !== b . i && p . next . i !== b . i && intersects ( p , p . next , a , b ) ) return true ; p = p . next ; } while ( p !== a ) ; return false ; }
check if a polygon diagonal intersects any polygon segments
check if a polygon diagonal intersects any polygon segments