Example usage for Java com.badlogic.gdx.math Rectangle fields, constructors, methods, implement or subclass
The text is from its open source code.
Rectangle(float x, float y, float width, float height) Constructs a new rectangle with the given corner point in the bottom left and dimensions. | |
Rectangle() Constructs a new rectangle with all values set to zero | |
Rectangle(Rectangle rect) Constructs a rectangle based on the given rectangle |
boolean | contains(Vector2 point) |
boolean | contains(Rectangle rectangle) |
boolean | contains(float x, float y) |
Vector2 | getCenter(Vector2 vector) Calculates the center of the rectangle. |
float | getHeight() |
Vector2 | getPosition(Vector2 position) return the Vector2 with coordinates of this rectangle |
Vector2 | getSize(Vector2 size) |
float | getWidth() |
float | getX() |
float | getY() |
Rectangle | merge(Rectangle rect) Merges this rectangle with the other rectangle. |
Rectangle | merge(Vector2 vec) Merges this rectangle with a point. |
Rectangle | merge(Vector2[] vecs) Merges this rectangle with a list of points. |
Rectangle | merge(float x, float y) Merges this rectangle with a point. |
boolean | overlaps(Rectangle r) |
Rectangle | set(float x, float y, float width, float height) |
Rectangle | set(Rectangle rect) Sets the values of the given rectangle to this rectangle. |
Rectangle | setCenter(float x, float y) Moves this rectangle so that its center point is located at a given position |
Rectangle | setHeight(float height) Sets the height of this rectangle |
Rectangle | setPosition(Vector2 position) Sets the x and y-coordinates of the bottom left corner from vector |
Rectangle | setSize(float width, float height) Sets the width and height of this rectangle |
Rectangle | setWidth(float width) Sets the width of this rectangle |
Rectangle | setY(float y) Sets the y-coordinate of the bottom left corner |