Package org.khelekore.prtree
Class SimpleMBR2D
- java.lang.Object
-
- org.khelekore.prtree.SimpleMBR2D
-
- All Implemented Interfaces:
MBR2D
public class SimpleMBR2D extends Object implements MBR2D
An implementation of MBR that keeps 4 double values for the actual min and max values needed.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 Summary
Constructors Constructor Description SimpleMBR2D(double xmin, double ymin, double xmax, double ymax)
Create a 2D minimum bounding box
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getMaxX()
Get the maximum x valuedouble
getMaxY()
Get the maximum y valuedouble
getMinX()
Get the minimum x valuedouble
getMinY()
Get the minimum y valueboolean
intersects(MBR2D other)
Check if the other MBR intersects this oneString
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
-
-
-
Method Detail
-
toString
public String toString()
Get a string representation of this mbr.
-
getMinX
public double getMinX()
Description copied from interface:MBR2D
Get the minimum x value
-
getMinY
public double getMinY()
Description copied from interface:MBR2D
Get the minimum y value
-
getMaxX
public double getMaxX()
Description copied from interface:MBR2D
Get the maximum x value
-
getMaxY
public double getMaxY()
Description copied from interface:MBR2D
Get the maximum y value
-
union
public MBR2D union(MBR2D other)
Description copied from interface:MBR2D
Return a new MBR that is the union of this mbr and the other
-
intersects
public boolean intersects(MBR2D other)
Description copied from interface:MBR2D
Check if the other MBR intersects this one- Specified by:
intersects
in interfaceMBR2D
- Parameters:
other
- the MBR to check against- Returns:
- true if the given MBR intersects with this MBR
-
-