Java com.badlogic.gdx.math Rectangle fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.math Rectangle fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.math Rectangle.

The text is from its open source code.

Subclass

com.badlogic.gdx.math.Rectangle has subclasses.
Click this link to see all its subclasses.

Constructor

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

Method

booleancontains(Vector2 point)
booleancontains(Rectangle rectangle)
booleancontains(float x, float y)
Vector2getCenter(Vector2 vector)
Calculates the center of the rectangle.
floatgetHeight()
Vector2getPosition(Vector2 position)
return the Vector2 with coordinates of this rectangle
Vector2getSize(Vector2 size)
floatgetWidth()
floatgetX()
floatgetY()
Rectanglemerge(Rectangle rect)
Merges this rectangle with the other rectangle.
Rectanglemerge(Vector2 vec)
Merges this rectangle with a point.
Rectanglemerge(Vector2[] vecs)
Merges this rectangle with a list of points.
Rectanglemerge(float x, float y)
Merges this rectangle with a point.
booleanoverlaps(Rectangle r)
Rectangleset(float x, float y, float width, float height)
Rectangleset(Rectangle rect)
Sets the values of the given rectangle to this rectangle.
RectanglesetCenter(float x, float y)
Moves this rectangle so that its center point is located at a given position
RectanglesetHeight(float height)
Sets the height of this rectangle
RectanglesetPosition(Vector2 position)
Sets the x and y-coordinates of the bottom left corner from vector
RectanglesetSize(float width, float height)
Sets the width and height of this rectangle
RectanglesetWidth(float width)
Sets the width of this rectangle
RectanglesetY(float y)
Sets the y-coordinate of the bottom left corner