org.jbox2d.collision.shapes
Class EdgeChainDef

java.lang.Object
  extended by org.jbox2d.collision.shapes.ShapeDef
      extended by org.jbox2d.collision.shapes.EdgeChainDef

public class EdgeChainDef
extends ShapeDef


Field Summary
 
Fields inherited from class org.jbox2d.collision.shapes.ShapeDef
density, filter, friction, isSensor, restitution, type, userData
 
Constructor Summary
EdgeChainDef()
           
 
Method Summary
 void addVertex(Vec2 newV)
          Add a vertex to the chain.
 int getVertexCount()
          Get the number of vertices in the chain.
 List<Vec2> getVertices()
          Return the raw vertex list.
 boolean isLoop()
          Is the chain a closed loop? If so, an extra edge will be created between the first and last vertices.
 void setIsLoop(boolean isLoop)
          Set whether an extra edge should be created between first and last vertices.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeChainDef

public EdgeChainDef()
Method Detail

addVertex

public void addVertex(Vec2 newV)
Add a vertex to the chain.

Parameters:
newV -

getVertexCount

public int getVertexCount()
Get the number of vertices in the chain.

Returns:

isLoop

public boolean isLoop()
Is the chain a closed loop? If so, an extra edge will be created between the first and last vertices.


setIsLoop

public void setIsLoop(boolean isLoop)
Set whether an extra edge should be created between first and last vertices.

Parameters:
isLoop - True if the chain should be a closed loop

getVertices

public List<Vec2> getVertices()
Return the raw vertex list. Modifications will effect the edge chain.

Returns: