public class Box
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
double |
xmax |
double |
xmin |
double |
ymax |
double |
ymin |
| Constructor and Description |
|---|
Box()
Instantiates a new Box with all values being 0.
|
Box(Box bbox) |
Box(double xmin,
double ymin,
double xmax,
double ymax)
Instantiates a new Box.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Box bbox) |
void |
add(double x,
double y) |
boolean |
contains(double x,
double y)
Check if Box contains point defined by coordinates x and y.
|
boolean |
contains(Point p)
Check if Box contains Point.
|
static Box |
createSafe(double x1,
double y1,
double x2,
double y2) |
double |
getHeight() |
double |
getWidth() |
boolean |
inside(Box box)
Check if this Box is inside box.
|
void |
map2mercator()
convrt map coordinates to lat/lon.
|
boolean |
overlap(Box other) |
void |
scale(double d) |
void |
setExtents(float[] points) |
java.lang.String |
toString() |
void |
translate(double dx,
double dy) |
public double xmin
public double xmax
public double ymin
public double ymax
public Box()
public Box(double xmin,
double ymin,
double xmax,
double ymax)
xmin - the min xymin - the min yxmax - the max xymax - the max ypublic Box(Box bbox)
public boolean contains(double x,
double y)
x - the x ordinatey - the y ordinatepublic boolean contains(Point p)
public boolean inside(Box box)
public double getWidth()
public double getHeight()
public boolean overlap(Box other)
public java.lang.String toString()
toString in class java.lang.Objectpublic static Box createSafe(double x1, double y1, double x2, double y2)
public void setExtents(float[] points)
public void add(Box bbox)
public void add(double x,
double y)
public void translate(double dx,
double dy)
public void scale(double d)
public void map2mercator()