public static class RTree.Box extends java.lang.Object implements RTree.Boxed
Constructor and Description |
---|
RTree.Box(float[] min,
float[] max)
Constructs an N-dimensional box with specified min/max bounds.
|
RTree.Box(float xmin,
float ymin,
float xmax,
float ymax)
Constructs a 2-dimensional box with specified min/max bounds.
|
RTree.Box(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)
Constructs a 3-dimensional box with specified min/max bounds.
|
RTree.Box(int ndim,
RTree.Boxed boxed)
Constructs an N-dimensional box for the specified boxed object.
|
Modifier and Type | Method and Description |
---|---|
void |
getBounds(float[] min,
float[] max)
Gets the N min/max coordinates for this box.
|
float |
getDistanceSquared(float[] point)
Gets the distance-squared from this box to a point.
|
boolean |
overlaps(RTree.Box box)
Determines whether this box overlaps the specified box.
|
public RTree.Box(float xmin, float ymin, float xmax, float ymax)
xmin
- the min X coordinate.ymin
- the min Y coordinate.xmax
- the max X coordinate.ymax
- the max Y coordinate.public RTree.Box(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
xmin
- the min X coordinate.ymin
- the min Y coordinate.zmin
- the min Z coordinate.xmax
- the max X coordinate.ymax
- the max Y coordinate.zmax
- the max Z coordinate.public RTree.Box(float[] min, float[] max)
min
- array of min coordinates.max
- array of max coordinates.public RTree.Box(int ndim, RTree.Boxed boxed)
ndim
- number N of min/max coordinates.boxed
- the boxed object.public void getBounds(float[] min, float[] max)
getBounds
in interface RTree.Boxed
min
- array to contain the min coordinates.max
- array to contain the max coordinates.public float getDistanceSquared(float[] point)
getDistanceSquared
in interface RTree.Boxed
point
- array of N point coordinates.public boolean overlaps(RTree.Box box)
box
- the box.