public class Rectangle
extends com.badlogic.gdx.math.Rectangle
| Constructor and Description |
|---|
Rectangle()
Constructor.
|
Rectangle(float x,
float y,
float width,
float height)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
float |
getCenterX()
Returns the center x coordinate of the
Rectangle |
float |
getCenterY()
Returns the center y coordiante of the
Rectangle |
float |
getMaxX()
Returns the x coordinate of the right side of this
Rectangle |
float |
getMaxY()
Returns the y coordinate of the bottom side of this
Rectangle |
boolean |
intersects(Rectangle rect)
Returns if another
Rectangle intersects this one |
void |
set(float x,
float y,
float width,
float height) |
void |
set(com.badlogic.gdx.math.Rectangle rectangle) |
void |
setCenterX(float x)
|
void |
setCenterY(float y)
|
void |
setHeight(float height) |
void |
setWidth(float width) |
void |
setX(float x) |
void |
setY(float y) |
public Rectangle()
Rectangle at 0,0 with a width and height
of 1public boolean intersects(Rectangle rect)
Rectangle intersects this onerect - The Rectangle to check if it intersects this onepublic void setX(float x)
setX in class com.badlogic.gdx.math.Rectanglepublic void setY(float y)
setY in class com.badlogic.gdx.math.Rectanglepublic void setWidth(float width)
setWidth in class com.badlogic.gdx.math.Rectanglepublic void setHeight(float height)
setHeight in class com.badlogic.gdx.math.Rectanglepublic void set(com.badlogic.gdx.math.Rectangle rectangle)
set in class com.badlogic.gdx.math.Rectanglepublic void set(float x,
float y,
float width,
float height)
set in class com.badlogic.gdx.math.Rectanglepublic float getCenterX()
Rectanglepublic void setCenterX(float x)
Rectangle and recalculates
the x and maxX coordinates based on the width of Rectanglex - public float getCenterY()
Rectanglepublic void setCenterY(float y)
Rectangle and recalculates
the y and maxY coordinates based on the height of the Rectangley - public float getMaxX()
Rectanglepublic float getMaxY()
RectangleCopyright © 2014. All rights reserved.