public final class BoundingBox
extends java.lang.Object
Rect
.Constructor and Description |
---|
BoundingBox(double l,
double t,
double r,
double b)
Constructor for a bounding box.
|
Modifier and Type | Method and Description |
---|---|
double |
getBottom()
Gets the bottommost y-coordinate
|
double |
getLeft()
Gets the leftmost x-coordinate
|
double |
getRight()
Gets the rightmost x-coordinate
|
double |
getTop()
Gets the uppermost y-coordinate
|
boolean |
intersectDestructively(BoundingBox bb)
Determines whether this bounding box intersects with the passed bounding
box and, if so, mutates the bounding box to be the intersection.
|
java.lang.String |
toString() |
public BoundingBox(double l, double t, double r, double b)
l
- leftmost x-coordinatet
- topmost y-coordinater
- rightmost x-coordinateb
- bottommost y-coordinatepublic boolean intersectDestructively(BoundingBox bb)
Rect.intersect(android.graphics.Rect)
.bb
- bounding box to intersect with this bounding boxtrue
if they intersect, false
otherwisepublic double getLeft()
public double getTop()
public double getRight()
public double getBottom()
public java.lang.String toString()
toString
in class java.lang.Object