Package net.dermetfan.gdx.physics.box2d
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 toChain.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
-
template
protected com.badlogic.gdx.physics.box2d.Body template
-
-
Constructor Details
-
CopyBuilder
public CopyBuilder(com.badlogic.gdx.physics.box2d.Body template)- Parameters:
template
- thetemplate
-
-
Method Details
-
createSegment
Description copied from interface:Chain.Builder
creates a segment that is going to be added toChain.segments
- Specified by:
createSegment
in interfaceChain.Builder
- Parameters:
index
- the index of the segment to createlength
- the desired length of theChain
that is being buildchain
- theChain
this segment will be added to- Returns:
- a
copy
oftemplate
-
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
- thetemplate
to set
-