Package geometry
Class Envelope
java.lang.Object
geometry.Envelope
public class Envelope
extends java.lang.Object
Extent as minimum bounding box
- Author:
- haunert
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description boolean
contains(Envelope env)
Checks whether this envelope contains another envelopevoid
expandToInclude(double x, double y)
Expand the current envelope by a point (x,y)void
expandToInclude(Envelope boundingBox)
Expand the current envelope by a bounding boxdouble
getxMax()
double
getxMin()
double
getyMax()
double
getyMin()
boolean
intersects(Envelope boundingBox)
Checks the intersection of two envelopesboolean
isBounded()
Checks whether the envelope is bounded or notjava.lang.String
toString()
-
Constructor Details
-
Method Details
-
getxMin
public double getxMin()- Returns:
- xMin
-
getyMin
public double getyMin()- Returns:
- yMin
-
getxMax
public double getxMax()- Returns:
- xMax
-
getyMax
public double getyMax()- Returns:
- yMax
-
expandToInclude
public void expandToInclude(double x, double y)Expand the current envelope by a point (x,y)- Parameters:
x
- x coordinate of the pointy
- y coordinate of the point
-
expandToInclude
Expand the current envelope by a bounding box- Parameters:
boundingBox
- Bounding box
-
intersects
Checks the intersection of two envelopes- Parameters:
boundingBox
- envelope to test- Returns:
- boolean value for the result of the intersection check
-
isBounded
public boolean isBounded()Checks whether the envelope is bounded or not- Returns:
- boolean value for the bounding test
-
contains
Checks whether this envelope contains another envelope- Parameters:
env
- envelope to be tested- Returns:
- boolean value for the containment test
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-