public interface Polygon
Modifier and Type | Method and Description |
---|---|
void |
addPoint(int x,
int y)
Add a point to the polygon.
|
boolean |
contains(Rectangle rectangle)
Check if the rectangle contains the other.
|
Rectangle |
getRectangle()
Get the polygon rectangle bounds.
|
boolean |
intersects(Rectangle rectangle)
Check if the rectangle intersects the other.
|
void |
reset()
Reset the polygon.
|
void addPoint(int x, int y)
x
- The horizontal location.y
- The vertical location.void reset()
Rectangle getRectangle()
boolean intersects(Rectangle rectangle)
rectangle
- The rectangle to test with.true
if intersect, false
else.boolean contains(Rectangle rectangle)
rectangle
- The rectangle to test with.true
if contains, false
else.