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 java.lang.Object
implements Chain.Builder
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected com.badlogic.gdx.physics.box2d.Body template
  • Constructor Summary

    Constructors
    Constructor Description
    CopyBuilder​(com.badlogic.gdx.physics.box2d.Body template)  
  • Method Summary

    Modifier and Type Method Description
    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
    com.badlogic.gdx.physics.box2d.Body getTemplate()  
    void setTemplate​(com.badlogic.gdx.physics.box2d.Body template)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.dermetfan.gdx.physics.box2d.Chain.Builder

    createConnection
  • 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