Package org.khelekore.prtree
Interface MBR
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SimpleMBR
public interface MBR extends Serializable
A minimum bounding box for n dimensions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getDimensions()
double
getMax(int axis)
Get the maximum value for the given axisdouble
getMin(int axis)
Get the minimum value for the given axisboolean
intersects(MBR other)
Check if the other MBR intersects this one<T> boolean
intersects(T t, MBRConverter<T> converter)
Check if this MBR intersects the rectangle given by the object and the MBRConverter.MBR
union(MBR mbr)
Return a new MBR that is the union of this mbr and the other
-
-
-
Method Detail
-
getDimensions
int getDimensions()
- Returns:
- the number of dimensions this bounding box has
-
getMin
double getMin(int axis)
Get the minimum value for the given axis- Parameters:
axis
- the axis to use- Returns:
- the min value
-
getMax
double getMax(int axis)
Get the maximum value for the given axis- Parameters:
axis
- the axis to use- Returns:
- the x max value
-
union
MBR union(MBR mbr)
Return a new MBR that is the union of this mbr and the other- Parameters:
mbr
- the MBR to create a union with- Returns:
- the new MBR
-
intersects
boolean intersects(MBR other)
Check if the other MBR intersects this one- Parameters:
other
- the MBR to check against- Returns:
- true if the given MBR intersects with this MBR
-
intersects
<T> boolean intersects(T t, MBRConverter<T> converter)
Check if this MBR intersects the rectangle given by the object and the MBRConverter.- Type Parameters:
T
- the object type- Parameters:
t
- a rectangular objectconverter
- the MBRConverter- Returns:
- true if the given MBR intersects with the given object
-
-