| Constructor and Description |
|---|
RectangleRegion(double xMin,
double yMin,
double xMax,
double yMax)
Construct a rectangular region.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Region r)
Find out if this region fully contains another region.
|
boolean |
equals(java.lang.Object o) |
double |
getArea()
Get the area of this rectangle.
|
double |
getOverlapArea(RectangleRegion other)
Calculate the overlap with another RectangleRegion.
|
double |
getXMax()
Get the upper X coordinate.
|
double |
getXMin()
Get the lower X coordinate.
|
double |
getYMax()
Get the upper Y coordinate.
|
double |
getYMin()
Get the lower Y coordinate.
|
int |
hashCode() |
boolean |
intersects(Region r)
Find out if this region intersects another region.
|
java.lang.String |
toString() |
public RectangleRegion(double xMin,
double yMin,
double xMax,
double yMax)
xMin - The lower X coordinate.yMin - The lower Y coordinate.xMax - The upper X coordinate.yMax - The upper Y coordinate.public double getXMin()
Regionpublic double getYMin()
Regionpublic double getXMax()
Regionpublic double getYMax()
Regionpublic double getOverlapArea(RectangleRegion other)
other - The other region.public double getArea()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean intersects(Region r)
Regionintersects in interface Regionr - The other region.