public class Polygon
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
float |
area() |
boolean |
contains(float x,
float y) |
void |
dirty() |
Rectangle |
getBoundingRectangle()
Returns an axis-aligned bounding box of this polygon.
|
float |
getOriginX() |
float |
getOriginY() |
float |
getRotation() |
float |
getScaleX() |
float |
getScaleY() |
float[] |
getTransformedVertices()
Returns vertices scaled, rotated, and offset by the polygon position.
|
float[] |
getVertices()
Returns vertices without scaling or rotation and without being offset by the polygon position.
|
float |
getX() |
float |
getY() |
void |
rotate(float degrees) |
void |
scale(float amount) |
void |
setOrigin(float originX,
float originY) |
void |
setPosition(float x,
float y) |
void |
setRotation(float degrees) |
void |
setScale(float scaleX,
float scaleY) |
void |
translate(float x,
float y) |
public float[] getVertices()
public float[] getTransformedVertices()
public void setOrigin(float originX,
float originY)
public void setPosition(float x,
float y)
public void translate(float x,
float y)
public void setRotation(float degrees)
public void rotate(float degrees)
public void setScale(float scaleX,
float scaleY)
public void scale(float amount)
public void dirty()
public float area()
public Rectangle getBoundingRectangle()
public boolean contains(float x,
float y)
public float getX()
public float getY()
public float getOriginX()
public float getOriginY()
public float getRotation()
public float getScaleX()
public float getScaleY()