* x-coordinate of upper-right coordinate
* @param y2
* y-coordinate of upper-right coordinate
*/
public void setBounds(float x1, float y1, float x2, float y2) {
worldAABB = new AABB(new Vec2(x1, y1), new Vec2(x2, y2));
outOfBoundsRegions = new AABB[] {
// everything below-left and directly left of worldAABB
new AABB(new Vec2(Float.MIN_VALUE, Float.MIN_VALUE), new Vec2(
x1, y2)),
// everything above-left and directly above worldAABB
new AABB(new Vec2(Float.MIN_VALUE, y2), new Vec2(x2,
Float.MAX_VALUE)),
// everything above-right and directly right of worldAABB
new AABB(new Vec2(x2, y1), new Vec2(Float.MAX_VALUE,
Float.MAX_VALUE)),
// everything below-right and directly below worldAABB
new AABB(new Vec2(x1, Float.MIN_VALUE), new Vec2(
Float.MAX_VALUE, y1)) };
}