libgdx API

com.badlogic.gdx.math
Class Polygon

java.lang.Object
  extended by com.badlogic.gdx.math.Polygon

public class Polygon
extends java.lang.Object


Constructor Summary
Polygon(float[] vertices)
           
 
Method Summary
 float area()
           
 boolean contains(float x, float y)
           
 Rectangle getBoundingRectangle()
           
 float getOriginX()
           
 float getOriginY()
           
 float getRotation()
           
 float getScaleX()
           
 float getScaleY()
           
 float[] getVertices()
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(float[] vertices)
Method Detail

getVertices

public float[] getVertices()

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)

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()

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)