Interface Chain.Builder

All Known Implementing Classes:
Chain.CopyBuilder, Chain.DefBuilder, Chain.DefShapeBuilder, Chain.JointDefCopyBuilder
Enclosing class:
Chain

public static interface Chain.Builder
used by a Chain to modify it
  • Method Summary

    Modifier and Type Method Description
    Chain.Connection createConnection​(com.badlogic.gdx.physics.box2d.Body seg1, int seg1index, com.badlogic.gdx.physics.box2d.Body seg2, int seg2index)
    connects two segments with each other using a Chain.Connection
    com.badlogic.gdx.physics.box2d.Body createSegment​(int index, int length, Chain chain)
    creates a segment that is going to be added to Chain.segments
  • Method Details

    • createSegment

      com.badlogic.gdx.physics.box2d.Body createSegment​(int index, int length, Chain chain)
      creates a segment that is going to be added to Chain.segments
      Parameters:
      index - the index of the segment to create
      length - the desired length of the Chain that is being build
      chain - the Chain this segment will be added to
      Returns:
      the created segment
    • createConnection

      Chain.Connection createConnection​(com.badlogic.gdx.physics.box2d.Body seg1, int seg1index, com.badlogic.gdx.physics.box2d.Body seg2, int seg2index)
      connects two segments with each other using a Chain.Connection
      Parameters:
      seg1 - the first segment
      seg1index - the index of the first segment
      seg2 - the second segment
      seg2index - the index of the second segment
      Returns:
      the created Chain.Connection