public interface Rectangle
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y)
Check if the rectangle contains the point.
|
boolean |
contains(Rectangle rectangle)
Check if the rectangle contains the other.
|
double |
getHeight()
Get the width.
|
double |
getMaxX()
Get the max x location.
|
double |
getMaxY()
Get the max y location.
|
double |
getMinX()
Get the min x location.
|
double |
getMinY()
Get the min y location.
|
double |
getWidth()
Get the width.
|
double |
getX()
Get the horizontal location.
|
double |
getY()
Get the vertical location.
|
boolean |
intersects(Rectangle rectangle)
Check if the rectangle intersects the other.
|
void |
set(double x,
double y,
double w,
double h)
Sets the location and size.
|
void |
translate(double vx,
double vy)
Translate rectangle using specified vector.
|
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.boolean contains(double x, double y)
x
- The horizontal location.y
- The vertical location.true
if contains, false
else.void translate(double vx, double vy)
vx
- The horizontal translation vector.vy
- The vertical translation vector.void set(double x, double y, double w, double h)
x
- The horizontal location.y
- The vertical location.w
- The rectangle width.h
- The rectangle height.double getX()
double getY()
double getMinX()
double getMinY()
double getMaxX()
double getMaxY()
double getWidth()
double getHeight()
Copyright © 2016 Byron 3D Games Studio. All rights reserved.