public class SimpleMBR2D extends Object implements MBR2D
Please note that you should not normally use this class when PRTree wants a MBR since this will actually use a lot of extra memory.
Constructor and Description |
---|
SimpleMBR2D(double xmin,
double ymin,
double xmax,
double ymax)
Create a 2D minimum bounding box
|
Modifier and Type | Method and Description |
---|---|
double |
getMaxX()
Get the maximum x value
|
double |
getMaxY()
Get the maximum y value
|
double |
getMinX()
Get the minimum x value
|
double |
getMinY()
Get the minimum y value
|
boolean |
intersects(MBR2D other)
Check if the other MBR intersects this one
|
String |
toString()
Get a string representation of this mbr.
|
MBR2D |
union(MBR2D other)
Return a new MBR that is the union of this mbr and the other
|
public SimpleMBR2D(double xmin, double ymin, double xmax, double ymax)
xmin
- the xmin of the MBRymin
- the ymin of the MBRxmax
- the xmax of the MBRymax
- the ymax of the MBRpublic String toString()
public double getMinX()
MBR2D
public double getMinY()
MBR2D
public double getMaxX()
MBR2D
public double getMaxY()
MBR2D
public MBR2D union(MBR2D other)
MBR2D
public boolean intersects(MBR2D other)
MBR2D
intersects
in interface MBR2D
other
- the MBR to check against