Class Chain.CopyBuilder

java.lang.Object
net.dermetfan.gdx.physics.box2d.Chain.CopyBuilder
All Implemented Interfaces:
Chain.Builder
Direct Known Subclasses:
Chain.JointDefCopyBuilder
Enclosing class:
Chain

public abstract static class Chain.CopyBuilder extends Object implements Chain.Builder
  • Field Details

  • Constructor Details

    • CopyBuilder

      public CopyBuilder(com.badlogic.gdx.physics.box2d.Body template)
      Parameters:
      template - the template
  • Method Details

    • createSegment

      public com.badlogic.gdx.physics.box2d.Body createSegment(int index, int length, Chain chain)
      Description copied from interface: Chain.Builder
      creates a segment that is going to be added to Chain.segments
      Specified by:
      createSegment in interface Chain.Builder
      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:
      a copy of template
    • getTemplate

      public com.badlogic.gdx.physics.box2d.Body getTemplate()
      Returns:
      the template
    • setTemplate

      public void setTemplate(com.badlogic.gdx.physics.box2d.Body template)
      Parameters:
      template - the template to set