| Constructor and Description |
|---|
SimpleMBR(double... values)
Create a new SimpleMBR using the given double values for max and min.
|
SimpleMBR(T t,
MBRConverter<T> converter)
Create a new SimpleMBR from a given object and a MBRConverter
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDimensions() |
double |
getMax(int axis)
Get the maximum value for the given axis
|
double |
getMin(int axis)
Get the minimum value for the given axis
|
boolean |
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.
|
String |
toString() |
MBR |
union(MBR mbr)
Return a new MBR that is the union of this mbr and the other
|
public SimpleMBR(double... values)
values - the min and max values for each dimension.public SimpleMBR(T t,
MBRConverter<T> converter)
t - the object to create the bounding box forconverter - the actual MBRConverter to usepublic int getDimensions()
getDimensions in interface MBRpublic double getMin(int axis)
MBRpublic double getMax(int axis)
MBRpublic MBR union(MBR mbr)
MBRpublic boolean intersects(MBR other)
MBRintersects in interface MBRother - the MBR to check againstpublic <T> boolean intersects(T t,
MBRConverter<T> converter)
MBRintersects in interface MBRT - the object typet - a rectangular objectconverter - the MBRConverter