public class SimplePoly
extends java.lang.Object
Constructor and Description |
---|
SimplePoly()
Creates an empty polygon
|
SimplePoly(com.mousebird.maply.Texture inTexture,
float[] color,
java.util.List<Point2d> pts,
java.util.List<Point2d> texCoords)
Creates a polygon based on a texture, color, points and text coordinates
|
Modifier and Type | Method and Description |
---|---|
void |
addColor(float r,
float g,
float b,
float a)
Sets the color of the poy
|
void |
addPt(Point2d pt)
Adds one point to the polygon definition
|
void |
addPts(Point2d[] pts)
Adds a list of points to the polygon definition
|
void |
addTexCoord(Point2d texCoord)
Adds a new text coordinate
|
void |
addTexCoords(Point2d[] texCoord)
Adds a list of text coordinates.
|
void |
addTexture(com.mousebird.maply.Texture texture)
Adds the texture to the polygon
|
void |
addTextureNative(long texID)
Adds the texture identifier.
|
void |
finalize() |
void |
setPt(int index,
Point2d newPt)
Changes one point in the polygon definition.
|
void |
setTexCoord(int index,
Point2d newTexCoord)
Changes one text coordinate.
|
public void finalize()
finalize
in class java.lang.Object
public void addTexture(com.mousebird.maply.Texture texture)
texture
- public void addTextureNative(long texID)
texID
- public void addColor(float r, float g, float b, float a)
public void addPt(Point2d pt)
pt
- point to add.public void addPts(Point2d[] pts)
pts
- list of pointspublic void setPt(int index, Point2d newPt)
index
- the index of the point to change.newPt
- the new point.public void addTexCoord(Point2d texCoord)
texCoord
- the text coordinatepublic void addTexCoords(Point2d[] texCoord)
texCoord
- the list of coordinates.public void setTexCoord(int index, Point2d newTexCoord)
index
- the index of the coordinate to changenewTexCoord
- the next coordinate