Gets the collision bounding boxes for the intersecting chunks.<br>
Called via ASM from {@link World#getCollisionBoxes(Entity, AxisAlignedBB)}

@param event the event
171447
@SubscribeEvent
	public void onGetCollisionBoxes(GetCollisionBoxesEvent event)
	//	public void getCollisionBoxes(World world, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity entity)
	{
		//no mask, no need to check for collision
		if (event.getAabb() == null)
			return;

		for (Chunk chunk : ChunkBlockHandler.getAffectedChunks(event.getWorld(), event.getAabb()))
			collisionRegistry.processCallbacks(chunk, event.getAabb(), event.getCollisionBoxesList());
	}
561638
public BoundingBox getBoundingBox(Projection projection) {

		BoundingBox boundingBox = null;

		List<String> tables = null;
		try {
			tables = getTables();
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to query for contents tables", e);
		}

		for (String table : tables) {
			BoundingBox tableBoundingBox = getBoundingBox(projection, table);
			if (tableBoundingBox != null) {
				if (boundingBox != null) {
					boundingBox = boundingBox.union(tableBoundingBox);
				} else {
					boundingBox = tableBoundingBox;
				}
			}
		}

		return boundingBox;
	}
1231622
public void onGeometryIndexHighlightEnd(GeometryIndexHighlightEndEvent event) {
		for (GeometryIndex index : event.getIndices()) {
			update(index, false);
		}
	}
652290
function(){

            var isX
                ,hash
                ,tr1
                ,tr2
                ,bound
                ,list
                ,len
                ,i
                ,j
                ,c
                // determine which axis is the last we need to check
                ,collisionFlag = 1 << (dof.z + 1) << (dof.y + 1) << (dof.x + 1)
                ,encounters = this.encounters
                ,enclen = 0
                ,candidates = this.candidates
                ;

            Physics.util.clearArray( encounters );
            Physics.util.clearArray( candidates );

            for ( var xyz = 0; xyz < maxDof; ++xyz ){

                // is the x coord
                isX = (xyz === 0);
                // get the interval list for this axis
                list = this.intervalLists[ xyz ];

                // for each interval bound
                for ( i = 0, len = list.length; i < len; i++ ){

                    bound = list[ i ];
                    tr1 = bound.tracker;

                    if ( bound.type ){

                        // is a max

                        j = enclen;

                        for ( j = enclen - 1; j >= 0; j-- ){

                            tr2 = encounters[ j ];

                            // if they are the same tracked interval
                            if ( tr2 === tr1 ){

                                // remove the interval from the encounters list
                                // faster than .splice()
                                if ( j < enclen - 1 ) {

                                    encounters[ j ] = encounters.pop();

                                } else {

                                    // encountered a max right after a min... no overlap
                                    encounters.pop();
                                }

                                enclen--;

                            } else {

                                // check if we have flagged this pair before
                                // if it's the x axis, create a pair
                                c = this.getPair( tr1, tr2, isX );

                                if ( c && c.flag < collisionFlag ){

                                    // if it's greater than the axis index, set the flag
                                    // to = 0.
                                    // if not, increment the flag by one.
                                    c.flag = c.flag << (xyz + 1);

                                    // c.flag will equal collisionFlag
                                    // if we've incremented the flag
                                    // enough that all axes are overlapping
                                    if ( c.flag === collisionFlag ){

                                        // overlaps on all axes.
                                        // add it to possible collision
                                        // candidates list for narrow phase

                                        candidates.push( c );
                                    }
                                }
                            }
                        }

                    } else {

                        // is a min
                        // just add this minimum to the encounters list
                        enclen = encounters.push( tr1 );
                    }
                }
            }

            return candidates;
        }
464707
function (x1, y1, x2, y2) {
		var polygons = this.polygons;
		for (var i = 0, n = polygons.length; i < n; i++)
			if (polygons[i].intersectsSegment(x1, y1, x2, y2)) return this.boundingBoxes[i];
		return null;
	}
797164
public BoundingBox getBoundingBox(Projection projection) {
		BoundingBox boundingBox = getBoundingBox();
		if (projection != null) {
			ProjectionTransform transform = getProjection().getTransformation(
					projection);
			if (!transform.isSameProjection()) {
				boundingBox = boundingBox.transform(transform);
			}
		}
		return boundingBox;
	}
1019812
@SubscribeEvent
	public void onChunkWatched(ChunkWatchEvent.Watch event)
	{
		Chunk chunk = event.getPlayer().world.getChunkFromChunkCoords(event.getChunk().x, event.getChunk().z);
		for (HandlerInfo<?> handlerInfo : handlerInfos.values())
		{
			ChunkData<?> chunkData = instance.chunkData(handlerInfo.identifier, chunk.getWorld(), chunk);
			if (chunkData != null && chunkData.hasData())
				BlockDataMessage.sendBlockData(chunk, handlerInfo.identifier, chunkData.toBytes(Unpooled.buffer()), event.getPlayer());
		}
	}
1122315
protected Coordinate getPanPosition(MouseEvent<?> event) {
		if (snappingActive) {
			return getTransformer().worldToPan(getWorldPosition(event));
		}
		return super.getPanPosition(event);
	}
203118
public void onGeometryEditMove(GeometryEditMoveEvent event) {
		
		// Find the elements that need updating:
		Map<GeometryIndex, Boolean> indicesToUpdate = new HashMap<GeometryIndex, Boolean>();
		for (GeometryIndex index : event.getIndices()) {
			if (!indicesToUpdate.containsKey(index)) {
				indicesToUpdate.put(index, false);
				if (!Geometry.POINT.equals(editingService.getGeometry().getGeometryType())
						&& !Geometry.MULTI_POINT.equals(editingService.getGeometry().getGeometryType())) {
					try {
						List<GeometryIndex> neighbors = null;
						switch (editingService.getIndexService().getType(index)) {
							case TYPE_VERTEX:
								// Move current vertex to the back. This helps the delete operation.
								indicesToUpdate.put(index, true);
								neighbors = editingService.getIndexService().getAdjacentEdges(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}

								neighbors = editingService.getIndexService().getAdjacentVertices(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}
								break;
							case TYPE_EDGE:
								neighbors = editingService.getIndexService().getAdjacentVertices(event.getGeometry(),
										index);
								if (neighbors != null) {
									for (GeometryIndex neighborIndex : neighbors) {
										if (!indicesToUpdate.containsKey(neighborIndex)) {
											indicesToUpdate.put(neighborIndex, false);
										}
									}
								}
								break;
							default:
						}
					} catch (GeometryIndexNotFoundException e) {
						throw new IllegalStateException(e);
					}
				}
			}
		}

		// Check if we need to draw the background (nice, but slows down):
		if (styleService.getBackgroundStyle() != null && styleService.getBackgroundStyle().getFillOpacity() > 0) {
			if (event.getGeometry().getGeometryType().equals(Geometry.POLYGON)) {
				org.geomajas.gwt.client.spatial.geometry.Geometry transformed = mapWidget.getMapModel()
						.getMapView().getWorldViewTransformer()
						.worldToPan(GeometryConverter.toGwt(event.getGeometry()));
				mapWidget.getVectorContext().drawPolygon(groups.get(baseName + ".background"), "background",
						(Polygon) transformed, styleService.getBackgroundStyle());
			} else if (event.getGeometry().getGeometryType().equals(Geometry.MULTI_POLYGON)
					&& event.getGeometry().getGeometries() != null) {
				for (int i = 0; i < event.getGeometry().getGeometries().length; i++) {
					Geometry polygon = event.getGeometry().getGeometries()[i];

					org.geomajas.gwt.client.spatial.geometry.Geometry transformed = mapWidget.getMapModel()
							.getMapView().getWorldViewTransformer().worldToPan(GeometryConverter.toGwt(polygon));
					mapWidget.getVectorContext().drawPolygon(
							groups.get(baseName + ".geometry" + i + ".background"), "background",
							(Polygon) transformed, styleService.getBackgroundStyle());
				}
			}
		}

		// Next, redraw the list:
		for (GeometryIndex index : indicesToUpdate.keySet()) {
			update(event.getGeometry(), index, indicesToUpdate.get(index));
		}

	}
430874
@Override
    public boolean collide(final Collidable collidable, final Collidable collidable2) {
        // check if bounding boxes intersect
        if (!RECTANGLE_COLLISION_CHECKER.collide(collidable, collidable2)) {
            return false;
        }

        final Point position = collidable.getPosition();
        final Point position2 = collidable2.getPosition();
        final CollisionRaster collisionRaster = collidable.getCollisionRaster();
        final CollisionRaster collisionRaster2 = collidable2.getCollisionRaster();

        // get the overlapping box
        final int startX = Math.max(position.x, position2.x);
        final int endX = Math.min(position.x + collidable.getDimension().width,
                                  position2.x + collidable2.getDimension().width);

        final int startY = Math.max(position.y, position2.y);
        final int endY = Math.min(position.y + collidable.getDimension().height,
                                  position2.y + collidable2.getDimension().height);

        final int endX1 = endX - position.x;
        final int endX2 = endX - position2.x;

        final int stop1 = position.x + -1;
        final int stop2 = position2.x + -1;
        
        // this is the fast path of finding collisions: we expect the none transparent
        // pixel to be around the center, using padding will increase this effect.
        final int stepSize = ((endY - startY) / 3) + 1;
        
        for (int i = stepSize - 1; i >= 0; i--) {
            for (int y = startY + i; y < endY; y += stepSize) {
                final int yOfPosition = y - position.y;
                int absolute1 = position.x + collisionRaster.nextNotTransparentPixel(
                        startX - position.x, endX1, yOfPosition
                );

                if (absolute1 == stop1) {
                    continue;
                }

                final int yOfPosition2 = y - position2.y;
                int absolute2 = position2.x + collisionRaster2.nextNotTransparentPixel(
                        startX - position2.x, endX2, yOfPosition2
                );

                if (absolute2 == stop2) {
                    continue;
                }
                
                while (true) {
                    if (absolute1 > absolute2) {
                        absolute2 = position2.x + collisionRaster2.nextNotTransparentPixel(
                                absolute1 - position2.x, endX2, yOfPosition2
                        );
                        
                        if (absolute2 == stop2) {
                            break;
                        } 
                    } else if (absolute1 < absolute2) {
                        absolute1 = position.x + collisionRaster.nextNotTransparentPixel(
                                absolute2 - position.x, endX1, yOfPosition
                        );
                        
                        if (absolute1 == stop1) {
                            break;
                        } 
                    } else {
                        return true;
                    }
                }
            }
        }
        return false;
    }
570497
private void getInertIndex(HashMap event) {
        int iDate;
        try {
            iDate = Integer.parseInt(getValueOr(event, "date", ""));
        } catch (Exception e) {
            next = events.size();
            return;
        }
        for (int i = isEventExist() ? next : 0; i < events.size(); i++) {
            try {
                if (iDate < Integer.parseInt(getValueOr(events.get(i), "date", "0"))) {
                    next = i;
                    return;
                }
            } catch (Exception e) {
            }
        }

        next = events.size();
    }
106833
public void onGeometryIndexHighlightBegin(GeometryIndexHighlightBeginEvent event) {
		for (GeometryIndex index : event.getIndices()) {
			update(event.getGeometry(), index, false);
		}
	}
315367
def generate_bbox(self, collision_function=None, tag=""):
        """"""
        boundingBox = AABoundingBox(None, collision_function, tag)
        CollisionManager.add_object(boundingBox)
727953
public int onTouchEvent(final MotionEvent event) {
        int status = -2;
        if (visibility != View.GONE) {
            final int action = event.getAction();

            final boolean isEventInCenterCircle = isInCenterCircle(event.getX(), event.getY());
            if (action == MotionEvent.ACTION_DOWN) {
                // check if center
                if (isEventInCenterCircle) {
                    updateDrawableState(VIEW_STATE_PRESSED, true);
                    status = MotionEvent.ACTION_DOWN;
                }
            } else if (action == MotionEvent.ACTION_UP) {
                final boolean isPressed = (mCombinedState & VIEW_STATE_PRESSED) != 0;
                if (isPressed && isEventInCenterCircle) {
                    updateDrawableState(VIEW_STATE_PRESSED, false);
                    status = MotionEvent.ACTION_UP;
                }

            } else if (action == MotionEvent.ACTION_MOVE) {
                if (!isEventInCenterCircle) {
                    updateDrawableState(VIEW_STATE_PRESSED, false);
                }
            }
        }
        return status;
    }
715860
protected Coordinate getScreenPosition(MouseEvent<?> event) {
		if (snappingActive) {
			return getTransformer().worldToView(getWorldPosition(event));
		}
		return super.getScreenPosition(event);
	}
1119283
public static Collection<Long> getTilesCoverage(final BoundingBox pBB, final int pZoomLevel){
        final Set<Long> result = new LinkedHashSet<>();
        for (Long mapTile : getTilesCoverageIterable(pBB, pZoomLevel, pZoomLevel)) {
            result.add(mapTile);
        }
        return result;
    }
1291797
protected Set<AggregatedGroupMapping> getGroupsForEvent(PortalEvent event) {
        final Set<AggregatedGroupMapping> groupMappings =
                new LinkedHashSet<AggregatedGroupMapping>();

        if (event instanceof LoginEvent) {
            for (final String groupKey : ((LoginEvent) event).getGroups()) {
                final AggregatedGroupMapping groupMapping =
                        this.aggregatedGroupLookupDao.getGroupMapping(groupKey);
                if (groupMapping != null) {
                    groupMappings.add(groupMapping);
                }
            }
        } else {
            final String userName = event.getUserName();
            final IGroupMember groupMember =
                    this.compositeGroupService.getGroupMember(userName, IPerson.class);
            for (@SuppressWarnings("unchecked")
                    final Iterator<IEntityGroup> containingGroups =
                            this.compositeGroupService.findParentGroups(groupMember);
                    containingGroups.hasNext(); ) {
                final IEntityGroup group = containingGroups.next();
                final AggregatedGroupMapping groupMapping =
                        this.aggregatedGroupLookupDao.getGroupMapping(
                                group.getServiceName().toString(), group.getName());
                groupMappings.add(groupMapping);
            }
        }

        return groupMappings;
    }