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()
Region
public double getYMin()
Region
public double getXMax()
Region
public double getYMax()
Region
public double getOverlapArea(RectangleRegion other)
other
- The other region.public double getArea()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean intersects(Region r)
Region
intersects
in interface Region
r
- The other region.