Class Chain.Connection

java.lang.Object
net.dermetfan.gdx.physics.box2d.Chain.Connection
Enclosing class:
Chain

public static class Chain.Connection
extends java.lang.Object
holds one or more joints
  • Field Summary

    Fields
    Modifier and Type Field Description
    com.badlogic.gdx.utils.Array<com.badlogic.gdx.physics.box2d.Joint> joints
    the joints of this Chain.Connection
  • Constructor Summary

    Constructors
    Constructor Description
    Connection​(com.badlogic.gdx.physics.box2d.Joint joint)
    creates a new Connection and adds the given joint
    Connection​(com.badlogic.gdx.physics.box2d.Joint... joints)
    creates a new Connection and adds the given joints
    Connection​(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2)
    creates a new Connection and adds the given joints
    Connection​(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2, com.badlogic.gdx.physics.box2d.Joint joint3)
    creates a new Connection and adds the given joints
  • Method Summary

    Modifier and Type Method Description
    void add​(com.badlogic.gdx.physics.box2d.Joint joint)
    adds the given joint to joints
    void destroy()
    destroys all joints
    com.badlogic.gdx.physics.box2d.Joint remove​(int index)
    removes the joint at the given index from joints
    boolean remove​(com.badlogic.gdx.physics.box2d.Joint joint)
    removes the given joint from joints

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • joints

      public final com.badlogic.gdx.utils.Array<com.badlogic.gdx.physics.box2d.Joint> joints
      the joints of this Chain.Connection
  • Constructor Details

    • Connection

      public Connection​(com.badlogic.gdx.physics.box2d.Joint joint)
      creates a new Connection and adds the given joint
    • Connection

      public Connection​(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2)
      creates a new Connection and adds the given joints
    • Connection

      public Connection​(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2, com.badlogic.gdx.physics.box2d.Joint joint3)
      creates a new Connection and adds the given joints
    • Connection

      public Connection​(com.badlogic.gdx.physics.box2d.Joint... joints)
      creates a new Connection and adds the given joints
  • Method Details

    • add

      public void add​(com.badlogic.gdx.physics.box2d.Joint joint)
      adds the given joint to joints
    • remove

      public boolean remove​(com.badlogic.gdx.physics.box2d.Joint joint)
      removes the given joint from joints
    • remove

      public com.badlogic.gdx.physics.box2d.Joint remove​(int index)
      removes the joint at the given index from joints
      Returns:
      the removed Joint
    • destroy

      public void destroy()
      destroys all joints