com.badlogic.gdx.math
Class Polygon
java.lang.Object
com.badlogic.gdx.math.Polygon
public class Polygon
- extends java.lang.Object
Constructor Summary |
Polygon(float[] vertices)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Polygon
public Polygon(float[] vertices)
getVertices
public float[] getVertices()
- Returns vertices without scaling or rotation and without being offset by the polygon position.
getTransformedVertices
public float[] getTransformedVertices()
- Returns vertices scaled, rotated, and offset by the polygon position.
setOrigin
public void setOrigin(float originX,
float originY)
setPosition
public void setPosition(float x,
float y)
translate
public void translate(float x,
float y)
setRotation
public void setRotation(float degrees)
rotate
public void rotate(float degrees)
setScale
public void setScale(float scaleX,
float scaleY)
scale
public void scale(float amount)
dirty
public void dirty()
area
public float area()
getBoundingRectangle
public Rectangle getBoundingRectangle()
contains
public boolean contains(float x,
float y)
getX
public float getX()
getY
public float getY()
getOriginX
public float getOriginX()
getOriginY
public float getOriginY()
getRotation
public float getRotation()
getScaleX
public float getScaleX()
getScaleY
public float getScaleY()
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)