public class Rectangle extends com.badlogic.gdx.math.Rectangle implements Parallelogram
Constructor and Description |
---|
Rectangle() |
Rectangle(float x,
float y,
float width,
float height) |
Modifier and Type | Method and Description |
---|---|
<T extends Positionable> |
addPostionChangeListener(PositionChangeListener<T> listener) |
boolean |
contains(Parallelogram parallelogram) |
boolean |
contains(Positionable positionable) |
boolean |
contains(Rectangle rectangle) |
void |
draw(Graphics g) |
float |
getCenterX() |
float |
getCenterY() |
float |
getDistanceTo(Positionable positionable) |
float |
getMaxX() |
float |
getMaxY() |
float |
getMinX() |
float |
getMinY() |
int |
getNumberOfSides() |
float |
getRotation() |
Rectangle |
intersection(Rectangle rect) |
boolean |
intersects(float x,
float y,
float width,
float height) |
boolean |
intersects(LineSegment lineSegment) |
boolean |
intersects(Parallelogram parallelogram) |
boolean |
intersects(Rectangle rectangle) |
<T extends Positionable> |
removePositionChangeListener(PositionChangeListener<T> listener) |
void |
rotate(float degrees) |
void |
rotateAround(Point center,
float degrees) |
void |
set(float x,
float y,
float width,
float height) |
void |
set(Rectangle rectangle) |
void |
set(com.badlogic.gdx.math.Rectangle rectangle) |
void |
setHeight(float height) |
void |
setWidth(float width) |
void |
setX(float x) |
void |
setY(float y) |
contains, contains, getHeight, getWidth, getX, getY, merge, overlaps, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getHeight, getWidth
getX, getY
public Rectangle()
public Rectangle(float x, float y, float width, float height)
public float getDistanceTo(Positionable positionable)
getDistanceTo
in interface Positionable
public <T extends Positionable> void addPostionChangeListener(PositionChangeListener<T> listener)
addPostionChangeListener
in interface Positionable
public <T extends Positionable> void removePositionChangeListener(PositionChangeListener<T> listener)
removePositionChangeListener
in interface Positionable
public float getRotation()
getRotation
in interface Parallelogram
public void rotate(float degrees)
rotate
in interface Parallelogram
public void rotateAround(Point center, float degrees)
rotateAround
in interface Parallelogram
public boolean intersects(LineSegment lineSegment)
intersects
in interface Parallelogram
public boolean intersects(Rectangle rectangle)
public boolean intersects(Parallelogram parallelogram)
intersects
in interface Parallelogram
public boolean intersects(float x, float y, float width, float height)
intersects
in interface Parallelogram
public boolean contains(Parallelogram parallelogram)
contains
in interface Parallelogram
public boolean contains(Rectangle rectangle)
public boolean contains(Positionable positionable)
contains
in interface Parallelogram
public int getNumberOfSides()
getNumberOfSides
in interface Shape
public void set(float x, float y, float width, float height)
set
in class com.badlogic.gdx.math.Rectangle
public void set(Rectangle rectangle)
public void set(com.badlogic.gdx.math.Rectangle rectangle)
set
in class com.badlogic.gdx.math.Rectangle
public void setX(float x)
setX
in class com.badlogic.gdx.math.Rectangle
public void setY(float y)
setY
in class com.badlogic.gdx.math.Rectangle
public void setWidth(float width)
setWidth
in class com.badlogic.gdx.math.Rectangle
public void setHeight(float height)
setHeight
in class com.badlogic.gdx.math.Rectangle
public float getCenterX()
public float getCenterY()
public float getMinX()
public float getMinY()
public float getMaxX()
public float getMaxY()
Copyright © 2014. All rights reserved.