public class BoundingBox extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BoundingBox.BoundingBoxNode |
Constructor and Description |
---|
BoundingBox(double minX,
double minY,
double maxX,
double maxY) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsPoint(double x,
double y) |
static boolean |
containsPoint(double x,
double y,
double width,
double height,
double px,
double py) |
boolean |
equals(Object o) |
static BoundingBox |
from(double x,
double y,
double width,
double height) |
double |
getMaxX() |
double |
getMaxY() |
double |
getMinX() |
double |
getMinY() |
QuadrantEnum |
getQuadrant(double x,
double y) |
QuadrantAppliesEnum |
getQuadrantApplies(double x,
double y,
double w,
double h) |
int |
hashCode() |
boolean |
intersectsBoxIncludingEnd(double x,
double y,
double width,
double height) |
static boolean |
intersectsBoxIncludingEnd(double minX,
double minY,
double maxX,
double maxY,
double otherX,
double otherY,
double otherWidth,
double otherHeight)
NOTE: Code-generation-invoked method, method name and parameter order matters
|
BoundingBox[] |
subdivide() |
String |
toString() |
BoundingBox.BoundingBoxNode |
treeForDepth(int depth) |
BoundingBox.BoundingBoxNode |
treeForPath(String[] path) |
public BoundingBox(double minX, double minY, double maxX, double maxY)
public double getMinX()
public double getMinY()
public double getMaxX()
public double getMaxY()
public boolean containsPoint(double x, double y)
public boolean intersectsBoxIncludingEnd(double x, double y, double width, double height)
public static boolean intersectsBoxIncludingEnd(double minX, double minY, double maxX, double maxY, double otherX, double otherY, double otherWidth, double otherHeight)
minX
- min-xminY
- min-ymaxX
- max-xmaxY
- max-yotherX
- xotherY
- yotherWidth
- wotherHeight
- hpublic static boolean containsPoint(double x, double y, double width, double height, double px, double py)
public QuadrantEnum getQuadrant(double x, double y)
public QuadrantAppliesEnum getQuadrantApplies(double x, double y, double w, double h)
public BoundingBox[] subdivide()
public BoundingBox.BoundingBoxNode treeForDepth(int depth)
public static BoundingBox from(double x, double y, double width, double height)
public BoundingBox.BoundingBoxNode treeForPath(String[] path)