Check to see if the specified object is colliding with any of the objects currently in the Collision Manager
        Returns the first object we are colliding with if there was a collision and None if no collisions was found
974122
def query_collision(collision_object):
        
        global collidable_objects
        # Note that we use a Brute Force approach for the time being.
        # It performs horribly under heavy loads, but it meets
        # our needs for the time being.
        for obj in collidable_objects:
            # Make sure we don't check ourself against ourself.
            if obj.obj_id is not collision_object.obj_id:
                if collision_object.is_colliding(obj):
                    # A collision has been detected. Return the object that we are colliding with.
                    return obj

        # No collision was noticed. Return None.
        return None
1195064
private HashtableEntry findEntry(Object key, int hashcode, int retrieveMode, boolean checkExpired, long current, int tableid)
                    throws IOException,
                    EOFException,
                    FileManagerException,
                    ClassNotFoundException,
                    HashtableOnDiskException {

        long previous = 0;

        long next = 0;
        int hash = 0;

        initReadBuffer(current);
        next = headerin.readLong();
        hash = headerin.readInt();

        while (current != 0) {
            if (hash == hashcode) { // hash the same?
                // 
                // Need to finish collision resolution and maybe return the object
                //
                HashtableEntry entry = readEntry2(current, next, hash, previous, retrieveMode, checkExpired, tableid, key, null); //493877
                if (entry != null) { // 493877 if entry is NOT null, the entry is found.
                    return entry;
                }
            }

            collisions++;
            //
            // Try for next object in bucket
            //
            previous = current;
            current = next;

            if (current != 0) { // optimize - don't read if we know we can't use it
                initReadBuffer(current);
                next = headerin.readLong();
                hash = headerin.readInt();
            }

        }

        //
        // If we fall through we did not find it
        //
        return null;
    }
216257
public final void traverse() {
    	//We have to check for && because 'traversalRequired' is not triggered by new objects,
    	//but new objects may have new objects referenced that are not marked as persistent.
    	//See issue #57.
    	if (!traversalRequired && !cache.hasDirtyPojos()) {
    		//shortcut
    		return;
    	}
        //Intention is to find the NEW objects that will become persistent
        //through reachability.
        //For this, we have to check objects that are DIRTY or NEW (by 
        //makePersistent()). 
//    	DBLogger.debugPrintln(1, "Starting OGT: " + workList.size());
//        long t1 = System.currentTimeMillis();
//        long nObjects = 0;
//
//        nObjects += traverseCache();
//        nObjects += traverseWorkList();
//                
//        long t2 = System.currentTimeMillis();
//        DBLogger.debugPrintln(1, "Finished OGT: " + nObjects + " (seen="
//                + seenObjects.size() + " ) / " + (t2-t1)/1000.0
//                + " MP=" + mpCount);
    	try {
	    	traverseCache();
	        traverseWorkList();
    	} finally {
    		workList.clear();
    		toBecomePersistent.clear();
    		//We have to clear the seenObjects here, see also issue #58.
    		seenObjects.clear();
    	}
        traversalRequired = false;
    }
168663
def has_intersection(self, other):
        
        return bool(lib.SDL_HasIntersection(self._ptr, other._ptr))
709381
function () {
    var data = this.data;
    var i;
    var objectEls;

    // Push meshes onto list of objects to intersect.
    if (data.objects) {
      objectEls = this.el.sceneEl.querySelectorAll(data.objects);
      this.objects = [];
      for (i = 0; i < objectEls.length; i++) {
        this.objects.push(objectEls[i].object3D);
      }
      return;
    }

    // If objects not defined, intersect with everything.
    this.objects = this.el.sceneEl.object3D.children;
  }
624944
def has_error(self):
        
        return next(
            (True for cr in self.component_results
             if cr.has_error()),
            False
        )
770619
private CollisionResult computeCollision(CollisionCategory category,
                                             double sh,
                                             double sv,
                                             double sx,
                                             double sy,
                                             int max)
    {
        double x = sh;
        double y = sv;
        double ox = x;
        double oy = y;

        boolean collX = false;
        boolean collY = false;

        CollisionResult last = null;
        for (int cur = 0; cur < max; cur++)
        {
            CollisionResult current = computeCollision(category, ox, oy, x, y);
            if (current != null)
            {
                last = current;
                if (current.getX() != null)
                {
                    x = current.getX().doubleValue();
                    collX = true;
                }
                else
                {
                    collX = false;
                }
                if (current.getY() != null)
                {
                    y = current.getY().doubleValue();
                    oy = y;
                }
            }
            else
            {
                collX = false;
            }

            if (!collX)
            {
                ox = x;
                x += sx;
            }

            current = computeCollision(category, ox, oy, x, y);
            if (current != null)
            {
                last = current;
                if (current.getX() != null)
                {
                    x = current.getX().doubleValue();
                }
                if (current.getY() != null)
                {
                    y = current.getY().doubleValue();
                    collY = true;
                }
                else
                {
                    collY = false;
                }
            }
            else
            {
                collY = false;
            }

            if (!collY)
            {
                oy = y;
                y += sy;
            }
        }
        if (category.isGlue())
        {
            if (last == null)
            {
                last = computeCollision(category, ox, oy, x, y - 1);
            }
            if (last == null)
            {
                last = computeCollision(category, ox, oy, x, y - 2);
            }
        }
        return last;
    }
142237
function( data ){

            var candidates = data.candidates
                ,pair
                ,targets = this.getTargets()
                ,collisions = []
                ,ret
                ,prevContacts = this.prevContacts || {}
                ,contactList = {}
                ,pairHash = Physics.util.pairHash
                ,hash
                ;

            for ( var i = 0, l = candidates.length; i < l; ++i ){

                pair = candidates[ i ];

                if ( targets === this._world._bodies ||
                    // only check if the members are targeted by this behavior
                    (Physics.util.indexOf( targets, pair.bodyA ) > -1) &&
                    (Physics.util.indexOf( targets, pair.bodyB ) > -1)
                ){
                    ret = checkPair( pair.bodyA, pair.bodyB );

                    if ( ret instanceof Array ){

                        for ( var j = 0, r, ll = ret.length; j < ll; j++ ){
                            r = ret[j];
                            if ( r ){
                                hash = pairHash( pair.bodyA.uid, pair.bodyB.uid );
                                contactList[ hash ] = true;
                                r.collidedPreviously = prevContacts[ hash ];
                                collisions.push( r );
                            }
                        }

                    } else if ( ret ){
                        hash = pairHash( pair.bodyA.uid, pair.bodyB.uid );
                        contactList[ hash ] = true;
                        ret.collidedPreviously = prevContacts[ hash ];

                        collisions.push( ret );
                    }
                }
            }

            this.prevContacts = contactList;

            if ( collisions.length ){

                this._world.emit( this.options.channel, {
                    collisions: collisions
                });
            }
        }
1116350
@Override
  public boolean intersects(IVersionRange yourRange)
  {
    // The set has explicit versions, so just check these against the supplied range
    for (IVersion version : set) {
      if (yourRange.contains(version)) {
        return true;
      }
    }
    return false;
  }
1016728
def each_collidable(&blk)
			@width.times do |i|
				@height.times do |j|
					cell = get_cell(i, j)
					if cell != 0
						blk.call(i, j)
					end
				end
			end
		end
132883
function(obj) {
                if (obj.normal) { return obj.intersects(this); }
                return (!this.isParallelTo(obj) && this.distanceFrom(obj) <= sylvester.precision);
              }
532465
function Collision(edit, hash, children) {
    return {
        type: COLLISION,
        edit: edit,
        hash: hash,
        children: children,
        _modify: Collision__modify
    };
}
1362086
private void checkOthers(Collidable objectA, Entry<Point, Set<Collidable>> current, Integer acceptedGroup)
    {
        final Map<Point, Set<Collidable>> acceptedElements = collidables.get(acceptedGroup);
        final Point point = current.getKey();
        if (acceptedElements.containsKey(point))
        {
            checkPoint(objectA, acceptedElements, point);
        }
    }
1025622
def intersects(self, e):
    
    if self.chrom != e.chrom:
      return False

    if e.start >= self.start and e.start < self.end:
      return True
    if e.end > self.start and e.end <= self.end:
      return True
    if e.start < self.start and e.end > self.end:
      return True
    return False
799435
def in_check(self, position, location=None):
        
        location = location or self.location
        for piece in position:

            if piece is not None and piece.color != self.color:
                if not isinstance(piece, King):
                    for move in piece.possible_moves(position):

                        if move.end_loc == location:
                            return True
                else:
                    if self.loc_adjacent_to_opponent_king(piece.location, position):
                        return True

        return False
647215
def query_all_collisions(collision_object):
        
        global collidable_objects
        colliding = []
        for obj in collidable_objects:
            #Make sure we don't check ourself against ourself.
            if obj is not collision_object:
                if collision_object.is_colliding(obj):
                    #A collision has been detected. Add the object that we are colliding with.
                    colliding.append(obj)

        return colliding
884250
def get_collision_state(self, collision_name):
        
        return self.call_remote_api('simxReadCollision',
                                    self.get_collision_handle(collision_name),
                                    streaming=True)