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 doublegetMaxX()Get the maximum x valuedoublegetMaxY()Get the maximum y valuedoublegetMinX()Get the minimum x valuedoublegetMinY()Get the minimum y valuebooleanintersects(MBR2D other)Check if the other MBR intersects this oneStringtoString()Get a string representation of this mbr.MBR2Dunion(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:MBR2DGet the minimum x value 
- 
getMinY
public double getMinY()
Description copied from interface:MBR2DGet the minimum y value 
- 
getMaxX
public double getMaxX()
Description copied from interface:MBR2DGet the maximum x value 
- 
getMaxY
public double getMaxY()
Description copied from interface:MBR2DGet the maximum y value 
- 
union
public MBR2D union(MBR2D other)
Description copied from interface:MBR2DReturn a new MBR that is the union of this mbr and the other 
- 
intersects
public boolean intersects(MBR2D other)
Description copied from interface:MBR2DCheck if the other MBR intersects this one- Specified by:
 intersectsin interfaceMBR2D- Parameters:
 other- the MBR to check against- Returns:
 - true if the given MBR intersects with this MBR
 
 
 - 
 
 -