Package net.dermetfan.gdx.physics.box2d
Class Chain.Connection
java.lang.Object
net.dermetfan.gdx.physics.box2d.Chain.Connection
- Enclosing class:
Chain
holds one or more
joints-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.badlogic.gdx.utils.Array<com.badlogic.gdx.physics.box2d.Joint> thejointsof thisChain.Connection -
Constructor Summary
ConstructorsConstructorDescriptionConnection(com.badlogic.gdx.physics.box2d.Joint joint) creates a new Connection andaddsthe given jointConnection(com.badlogic.gdx.physics.box2d.Joint... joints) creates a new Connection andaddsthe given jointsConnection(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2) creates a new Connection andaddsthe given jointsConnection(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 andaddsthe given joints -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(com.badlogic.gdx.physics.box2d.Joint joint) addsthe given joint tojointsvoiddestroy()destroysalljointscom.badlogic.gdx.physics.box2d.Jointremove(int index) removesthe joint at the given index fromjointsbooleanremove(com.badlogic.gdx.physics.box2d.Joint joint) removesthe given joint fromjoints
-
Field Details
-
joints
public final com.badlogic.gdx.utils.Array<com.badlogic.gdx.physics.box2d.Joint> jointsthejointsof thisChain.Connection
-
-
Constructor Details
-
Connection
public Connection(com.badlogic.gdx.physics.box2d.Joint joint) creates a new Connection andaddsthe given joint -
Connection
public Connection(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2) creates a new Connection andaddsthe 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 andaddsthe given joints -
Connection
public Connection(com.badlogic.gdx.physics.box2d.Joint... joints) creates a new Connection andaddsthe given joints
-
-
Method Details
-
add
public void add(com.badlogic.gdx.physics.box2d.Joint joint) addsthe given joint tojoints -
remove
public boolean remove(com.badlogic.gdx.physics.box2d.Joint joint) removesthe given joint fromjoints -
remove
public com.badlogic.gdx.physics.box2d.Joint remove(int index) removesthe joint at the given index fromjoints- Returns:
- the removed
Joint
-
destroy
public void destroy()destroysalljoints
-