|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.physics.box2d.Shape com.badlogic.gdx.physics.box2d.ChainShape
public class ChainShape
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.badlogic.gdx.physics.box2d.Shape |
---|
Shape.Type |
Constructor Summary | |
---|---|
ChainShape()
|
Method Summary | |
---|---|
void |
createChain(float[] vertices)
Create a chain with isolated end vertices. |
void |
createChain(Vector2[] vertices)
Create a chain with isolated end vertices. |
void |
createLoop(Vector2[] vertices)
Create a loop. |
Shape.Type |
getType()
Get the type of this shape. |
void |
getVertex(int index,
Vector2 vertex)
Returns the vertex at the given position. |
int |
getVertexCount()
|
boolean |
isLooped()
|
void |
setNextVertex(float nextVertexX,
float nextVertexY)
Establish connectivity to a vertex that follows the last vertex. |
void |
setNextVertex(Vector2 nextVertex)
Establish connectivity to a vertex that follows the last vertex. |
void |
setPrevVertex(float prevVertexX,
float prevVertexY)
Establish connectivity to a vertex that precedes the first vertex. |
void |
setPrevVertex(Vector2 prevVertex)
Establish connectivity to a vertex that precedes the first vertex. |
Methods inherited from class com.badlogic.gdx.physics.box2d.Shape |
---|
dispose, getChildCount, getRadius, setRadius |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChainShape()
Method Detail |
---|
public Shape.Type getType()
Shape
getType
in class Shape
public void createLoop(Vector2[] vertices)
vertices
- an array of vertices, these are copiedpublic void createChain(float[] vertices)
vertices
- an array of floats of alternating x, y coordinates.public void createChain(Vector2[] vertices)
vertices
- an array of vertices, these are copiedpublic void setPrevVertex(Vector2 prevVertex)
public void setPrevVertex(float prevVertexX, float prevVertexY)
public void setNextVertex(Vector2 nextVertex)
public void setNextVertex(float nextVertexX, float nextVertexY)
public int getVertexCount()
public void getVertex(int index, Vector2 vertex)
index
- the index of the vertex 0 <= index < getVertexCount( )vertex
- vertexpublic boolean isLooped()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |