public final class BoundBox
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static BoundBox |
NULL_BOUNDS |
| Constructor and Description |
|---|
BoundBox() |
BoundBox(double minX,
double minY,
double maxX,
double maxY) |
| Modifier and Type | Method and Description |
|---|---|
BoundBox |
add(double x,
double y) |
boolean |
contains(double x,
double y) |
BoundBox |
copy() |
boolean |
equals(java.lang.Object o) |
BoundBox |
expand(double amount) |
BoundBox |
expand(double x,
double y) |
double |
getArea() |
double |
getBoundEdge(Direction direction)
Gets the position of an edge based on the direction.
|
double |
getCenterX() |
double |
getCenterY() |
static BoundBox |
getCombinedBoundBox(java.util.List<BoundBox> boxes) |
double |
getHeight() |
BoundBox |
getIntersection(BoundBox other) |
double |
getMaxX() |
double |
getMaxY() |
double |
getMinX() |
double |
getMinY() |
BoundBox |
getUnion(BoundBox other) |
double |
getWidth() |
int |
hashCode() |
boolean |
intersects(BoundBox other) |
boolean |
intersects(double minX,
double minY,
double maxX,
double maxY) |
boolean |
isEmpty() |
BoundBox |
set(BoundBox box) |
BoundBox |
set(double minX,
double minY,
double maxX,
double maxY) |
java.lang.String |
toString() |
public static final BoundBox NULL_BOUNDS
public BoundBox()
public BoundBox(double minX,
double minY,
double maxX,
double maxY)
public BoundBox set(double minX, double minY, double maxX, double maxY)
public BoundBox add(double x, double y)
public BoundBox expand(double x, double y)
public BoundBox expand(double amount)
public boolean intersects(BoundBox other)
public boolean intersects(double minX,
double minY,
double maxX,
double maxY)
public boolean contains(double x,
double y)
public boolean isEmpty()
public double getBoundEdge(Direction direction)
direction - The (CARDINAL) direction towards the edgepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic double getMinX()
public double getMinY()
public double getMaxX()
public double getMaxY()
public double getWidth()
public double getHeight()
public double getArea()
public double getCenterX()
public double getCenterY()
public BoundBox copy()