docs/csg.js
function(csg) {
            if ((this.polygons.length === 0) || (csg.polygons.length === 0)) {
                return false;
            } else {
                var mybounds = this.getBounds();
                var otherbounds = csg.getBounds();
                if (mybounds[1].x < otherbounds[0].x) return false;
                if (mybounds[0].x > otherbounds[1].x) return false;
                if (mybounds[1].y < otherbounds[0].y) return false;
                if (mybounds[0].y > otherbounds[1].y) return false;
                if (mybounds[1].z < otherbounds[0].z) return false;
                if (mybounds[0].z > otherbounds[1].z) return false;
                return true;
            }
        }
function(csg) {
            if ((this.polygons.length === 0) || (csg.polygons.length === 0)) {
                return false;
            } else {
                var mybounds = this.getBounds();
                var otherbounds = csg.getBounds();
                if (mybounds[1].x < otherbounds[0].x) return false;
                if (mybounds[0].x > otherbounds[1].x) return false;
                if (mybounds[1].y < otherbounds[0].y) return false;
                if (mybounds[0].y > otherbounds[1].y) return false;
                if (mybounds[1].z < otherbounds[0].z) return false;
                if (mybounds[0].z > otherbounds[1].z) return false;
                return true;
            }
        }
function ( csg ) { if ( ( this . polygons . length === 0 ) || ( csg . polygons . length === 0 ) ) { return false ; } else { var mybounds = this . getBounds ( ) ; var otherbounds = csg . getBounds ( ) ; if ( mybounds [ 1 ] . x < otherbounds [ 0 ] . x ) return false ; if ( mybounds [ 0 ] . x > otherbounds [ 1 ] . x ) return false ; if ( mybounds [ 1 ] . y < otherbounds [ 0 ] . y ) return false ; if ( mybounds [ 0 ] . y > otherbounds [ 1 ] . y ) return false ; if ( mybounds [ 1 ] . z < otherbounds [ 0 ] . z ) return false ; if ( mybounds [ 0 ] . z > otherbounds [ 1 ] . z ) return false ; return true ; } }
returns true if there is a possibility that the two solids overlap returns false if we can be sure that they do not overlap
returns true if there is a possibility that the two solids overlap returns false if we can be sure that they do not overlap