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>
joints
thejoints
of thisChain.Connection
-
Constructor Summary
Constructors Constructor Description Connection(com.badlogic.gdx.physics.box2d.Joint joint)
creates a new Connection andadds
the given jointConnection(com.badlogic.gdx.physics.box2d.Joint... joints)
creates a new Connection andadds
the given jointsConnection(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2)
creates a new Connection andadds
the 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 andadds
the given joints -
Method Summary
Modifier and Type Method Description void
add(com.badlogic.gdx.physics.box2d.Joint joint)
adds
the given joint tojoints
void
destroy()
destroys
alljoints
com.badlogic.gdx.physics.box2d.Joint
remove(int index)
removes
the joint at the given index fromjoints
boolean
remove(com.badlogic.gdx.physics.box2d.Joint joint)
removes
the given joint fromjoints
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> jointsthejoints
of thisChain.Connection
-
-
Constructor Details
-
Connection
public Connection(com.badlogic.gdx.physics.box2d.Joint joint)creates a new Connection andadds
the given joint -
Connection
public Connection(com.badlogic.gdx.physics.box2d.Joint joint1, com.badlogic.gdx.physics.box2d.Joint joint2)creates a new Connection andadds
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 andadds
the given joints -
Connection
public Connection(com.badlogic.gdx.physics.box2d.Joint... joints)creates a new Connection andadds
the given joints
-
-
Method Details
-
add
public void add(com.badlogic.gdx.physics.box2d.Joint joint)adds
the given joint tojoints
-
remove
public boolean remove(com.badlogic.gdx.physics.box2d.Joint joint)removes
the given joint fromjoints
-
remove
public com.badlogic.gdx.physics.box2d.Joint remove(int index)removes
the joint at the given index fromjoints
- Returns:
- the removed
Joint
-
destroy
public void destroy()destroys
alljoints
-