public class PolygonRegion
extends java.lang.Object
| Constructor and Description |
|---|
PolygonRegion(TextureRegion region,
FileHandle file)
Creates a PolygonRegion by reading in the vertices and texture coordinates from the external file.
|
PolygonRegion(TextureRegion region,
float[] vertices)
Creates a PolygonRegin by triangulating the polygon coordinates in vertices and calculates uvs based on that.
|
| Modifier and Type | Method and Description |
|---|---|
float[] |
getLocalVertices() |
TextureRegion |
getRegion() |
float[] |
getTextureCoords() |
public PolygonRegion(TextureRegion region, FileHandle file)
region - the region used for drawingfile - polygon shape definition filepublic PolygonRegion(TextureRegion region, float[] vertices)
region - the region used for drawingvertices - contains 2D polygon coordinates in pixels relative to source regionpublic float[] getLocalVertices()
public float[] getTextureCoords()
public TextureRegion getRegion()