com.badlogic.gdx.physics.box2d
Class ChainShape
java.lang.Object
com.badlogic.gdx.physics.box2d.Shape
com.badlogic.gdx.physics.box2d.ChainShape
public class ChainShape
- extends Shape
Nested classes/interfaces inherited from class com.badlogic.gdx.physics.box2d.Shape |
Shape.Type |
Fields inherited from class com.badlogic.gdx.physics.box2d.Shape |
addr |
Method Summary |
Shape.Type |
getType()
Get the type of this shape. |
void |
getVertex(int index,
Vector2 vertex)
Returns the vertex at the given position. |
int |
getVertexCount()
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChainShape
public ChainShape()
getType
public Shape.Type getType()
- Description copied from class:
Shape
- Get the type of this shape. You can use this to down cast to the concrete shape.
- Specified by:
getType
in class Shape
- Returns:
- the shape type.
setPrevVertex
public void setPrevVertex(Vector2 prevVertex)
- Establish connectivity to a vertex that precedes the first vertex.
Don't call this for loops.
setPrevVertex
public void setPrevVertex(float prevVertexX,
float prevVertexY)
- Establish connectivity to a vertex that precedes the first vertex.
Don't call this for loops.
setNextVertex
public void setNextVertex(Vector2 nextVertex)
- Establish connectivity to a vertex that follows the last vertex.
Don't call this for loops.
setNextVertex
public void setNextVertex(float nextVertexX,
float nextVertexY)
- Establish connectivity to a vertex that follows the last vertex.
Don't call this for loops.
getVertexCount
public int getVertexCount()
- Returns:
- the number of vertices
getVertex
public void getVertex(int index,
Vector2 vertex)
- Returns the vertex at the given position.
- Parameters:
index
- the index of the vertex 0 <= index < getVertexCount( )vertex
- vertex
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)