Package net.dermetfan.gdx.physics.box2d
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>jointsthejointsof thisChain.Connection -
Constructor Summary
Constructors Constructor Description Connection(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 Type Method Description voidadd(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 fromjointsMethods 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> 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
-