public class PolygonRegion extends Object
PolygonRegionLoader
Constructor and Description |
---|
PolygonRegion(TextureRegion region,
float[] vertices,
short[] triangles)
Creates a PolygonRegion by triangulating the polygon coordinates in vertices and calculates uvs based on that.
|
Modifier and Type | Method and Description |
---|---|
TextureRegion |
getRegion() |
float[] |
getTextureCoords() |
short[] |
getTriangles() |
float[] |
getVertices()
Returns the vertices in local space.
|
public PolygonRegion(TextureRegion region, float[] vertices, short[] triangles)
region
- the region used for drawingvertices
- contains 2D polygon coordinates in pixels relative to source regionpublic float[] getVertices()
public short[] getTriangles()
public float[] getTextureCoords()
public TextureRegion getRegion()
Copyright © 2015. All rights reserved.