# Class ChainShape

java.lang.Object
com.codename1.gaming.physics.box2d.collision.shapes.Shape
com.codename1.gaming.physics.box2d.collision.shapes.ChainShape

public class ChainShape extends Shape

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `m_count`
  `boolean`
  `m_hasNextVertex`
  `boolean`
  `m_hasPrevVertex`
  `final Vec2`
  `m_nextVertex`
  `final Vec2`
  `m_prevVertex`
  `Vec2[]`
  `m_vertices`

  ### Fields inherited from class Shape

  `m_radius, m_type`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ChainShape()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Shape`
  `clone()`
  `void`
  `computeAABB(AABB aabb, Transform xf, int childIndex)`
  `void`
  `computeMass(MassData massData, float density)`
  `void`
  `createChain(Vec2[] vertices, int count)`
  `void`
  `createLoop(Vec2[] vertices, int count)`
  `int`
  `getChildCount()`
  `void`
  `getChildEdge(EdgeShape edge, int index)`
  `boolean`
  `raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex)`
  `void`
  `setNextVertex(Vec2 nextVertex)`
  `void`
  `setPrevVertex(Vec2 prevVertex)`
  `boolean`
  `testPoint(Transform xf, Vec2 p)`

  ### Methods inherited from class Shape

  `getRadius, getType, setRadius`

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### m_vertices

    public Vec2[] m_vertices

  - ### m_count

    public int m_count

  - ### m_prevVertex

    public final Vec2 m_prevVertex

  - ### m_nextVertex

    public final Vec2 m_nextVertex

  - ### m_hasPrevVertex

    public boolean m_hasPrevVertex

  - ### m_hasNextVertex

    public boolean m_hasNextVertex

- ## Constructor Details

  - ### ChainShape

    public ChainShape()

- ## Method Details

  - ### getChildCount

    public int getChildCount()
    Specified by:
      `getChildCount` in class `Shape`

  - ### getChildEdge

    public void getChildEdge(EdgeShape edge, int index)

  - ### testPoint

    public boolean testPoint(Transform xf, Vec2 p)
    Specified by:
      `testPoint` in class `Shape`

  - ### raycast

    public boolean raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex)
    Specified by:
      `raycast` in class `Shape`

  - ### computeAABB

    public void computeAABB(AABB aabb, Transform xf, int childIndex)
    Specified by:
      `computeAABB` in class `Shape`

  - ### computeMass

    public void computeMass(MassData massData, float density)
    Specified by:
      `computeMass` in class `Shape`

  - ### clone

    public Shape clone()
    Specified by:
      `clone` in class `Shape`

  - ### createLoop

    public void createLoop(Vec2[] vertices, int count)

  - ### createChain

    public void createChain(Vec2[] vertices, int count)

  - ### setPrevVertex

    public void setPrevVertex(Vec2 prevVertex)

  - ### setNextVertex

    public void setNextVertex(Vec2 nextVertex)