public class BoundingBox extends Object implements Serializable
Constructor and Description |
---|
BoundingBox()
Creates an empty bounding box
|
BoundingBox(BoundingBox other)
Copy constructor
|
BoundingBox(double minx,
double maxx,
double miny,
double maxy,
double minz,
double maxz)
Creates a bounding box given the extent
|
BoundingBox(Point lowerLeft,
Point upperRight)
Create a bounding box between lowerLeft and upperRight
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(BoundingBox other)
Tests if the other BoundingBox lies wholely inside this BoundingBox
|
double |
getHeight() |
Point |
getMaxPoint() |
Point |
getMinPoint() |
double |
getWidth() |
boolean |
isNull()
Returns true if this BoundingBox is a "null" envelope.
|
double |
maxX() |
double |
maxY() |
double |
minX() |
double |
minY() |
String |
toString() |
BoundingBox |
unionWith(BoundingBox other)
Unify the BoundingBoxes of this and the other BoundingBox
|
public BoundingBox()
public BoundingBox(BoundingBox other)
other
- the copied bounding boxpublic BoundingBox(double minx, double maxx, double miny, double maxy, double minz, double maxz)
minx
- minimum x coordinatemaxx
- maximum x coordinateminy
- minimum y coordinatemaxy
- maximum y coordinatepublic boolean isNull()
public boolean contains(BoundingBox other)
other
- the BoundingBox to checkpublic BoundingBox unionWith(BoundingBox other)
other
- another BoundingBoxpublic double minX()
public double minY()
public double maxX()
public double maxY()
public double getWidth()
public double getHeight()
public Point getMinPoint()
public Point getMaxPoint()
Copyright © 2016. All rights reserved.