package me.vrekt.lunar.collision;

import java.awt.Rectangle;

public class BoundingBox {

	public int x, y, width, height;
	public Rectangle bounds;

	/**
	 * Initialize the boundingBox
	 */
	public BoundingBox(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;

		this.bounds = new Rectangle(x, y, width, height);
	}

	/**
	 * Update the boundingBox.
	 */
	public void update(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;

		bounds.setBounds(x, y, width, height);
	}

	/**
	 * Return if the current boundingBox intersects with another.
	 */
	public boolean doesIntersect(BoundingBox box) {
		return bounds.intersects(box.bounds);
	}
}

@@ -95,106 +95,662 @@
 %0A%0D%0A%09
-public int x, y, width, height;%0D%0A%09public Rectangle bounds;%0D%0A%0D%0A%09/**%0D%0A%09 * Initialize the boundingBox
+/**%0D%0A%09 * The x origin of this BoundingBox.%0D%0A%09 */%0D%0A%09public int x;%0D%0A%0D%0A%09/**%0D%0A%09 * The y origin of this BoundingBox.%0D%0A%09 */%0D%0A%09public int y;%0D%0A%0D%0A%09/**%0D%0A%09 * The width of this BoundingBox.%0D%0A%09 */%0D%0A%09public int width;%0D%0A%0D%0A%09/**%0D%0A%09 * The height of this BoundingBox.%0D%0A%09 */%0D%0A%09public int height;%0D%0A%0D%0A%09/**%0D%0A%09 * The bounds of this BoundingBox.%0D%0A%09 */%0D%0A%09public Rectangle bounds;%0D%0A%0D%0A%09/**%0D%0A%09 * Initialize the BoundingBox.%0D%0A%09 * @param x The x origin to initialize this BoundingBox with.%0D%0A%09 * @param y The y origin to initialize this BoundingBox with.%0D%0A%09 * @param width The width to initialize this BoundingBox with.%0D%0A%09 * @param height The height to initialize this BoundingBox with.
 %0D%0A%09 
@@ -966,30 +966,186 @@
 %09 * 
-Update the boundingBox
+Set the values of this BoundingBox.%0D%0A%09 * @param x The x origin to set.%0D%0A%09 * @param y The y origin to set.%0D%0A%09 * @param width The width to set.%0D%0A%09 * @param height The height to set
 .%0D%0A%09
@@ -1373,43 +1373,194 @@
 ent 
-boundingBox intersects with another
+BoundingBox intersects with another.%0D%0A%09 * @param box The other BoundingBox to check against.%0D%0A%09 * @return True if the passed in BoundingBox intersects with this one,%0D%0A%09 * otherwise false
 .%0D%0A%09

Add and refine javadoc in BoundingBox.java