| Modifier and Type | Field and Description |
|---|---|
| private static float[] |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Shape. | getType()
Implements abstract com. Get the type of this shape. |
| public void | |
| public int | |
| private native void | |
| private native int | |
| private native void | |
| private native void | |
| private native void | |
| private native long | |
| public void | |
| public void | |
| public void | set(float[] vertices, int offset, int len)
Copy vertices from the given float array, taking into account the offset and length. |
| public void | setAsBox(float
the half-width. hx, float the half-height. hy)Build vertices to represent an axis-aligned box. |
| public void |
| verts | back to summary |
|---|---|
| private static float[] verts | |
| PolygonShape | back to summary |
|---|---|
| public PolygonShape() Constructs a new polygon | |
| PolygonShape | back to summary |
|---|---|
| protected PolygonShape(long addr) | |
| getType | back to summary |
|---|---|
| public Shape. Implements abstract com. Doc from com. Get the type of this shape. You can use this to down cast to the concrete shape.
| |
| getVertex | back to summary |
|---|---|
| public void getVertex(int index, Vector2 vertex) Returns the vertex at the given position.
| |
| getVertexCount | back to summary |
|---|---|
public int getVertexCount()
| |
| jniGetVertex | back to summary |
|---|---|
| private native void jniGetVertex(long addr, int index, float[] verts) | |
| jniGetVertexCount | back to summary |
|---|---|
| private native int jniGetVertexCount(long addr) | |
| jniSet | back to summary |
|---|---|
| private native void jniSet(long addr, float[] verts, int offset, int len) | |
| jniSetAsBox | back to summary |
|---|---|
| private native void jniSetAsBox(long addr, float hx, float hy) | |
| jniSetAsBox | back to summary |
|---|---|
| private native void jniSetAsBox(long addr, float hx, float hy, float centerX, float centerY, float angle) | |
| newPolygonShape | back to summary |
|---|---|
| private native long newPolygonShape() | |
| set | back to summary |
|---|---|
| public void set(Vector2[] vertices) Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge. | |
| set | back to summary |
|---|---|
| public void set(float[] vertices) Copy vertices from the given float array. It is assumed the vertices are in x,y order and define a convex polygon. It is assumed that the exterior is the the right of each edge. | |
| set | back to summary |
|---|---|
| public void set(float[] vertices, int offset, int len) Copy vertices from the given float array, taking into account the offset and length. It is assumed the vertices are in x,y order and define a convex polygon. It is assumed that the exterior is the the right of each edge. | |
| setAsBox | back to summary |
|---|---|
| public void setAsBox(float hx, float hy) Build vertices to represent an axis-aligned box.
| |
| setAsBox | back to summary |
|---|---|
| public void setAsBox(float hx, float hy, Vector2 center, float angle) Build vertices to represent an oriented box.
| |