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.Bodytemplate -
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.BodycreateSegment(int index, int length, Chain chain)creates a segment that is going to be added toChain.segmentscom.badlogic.gdx.physics.box2d.BodygetTemplate()voidsetTemplate(com.badlogic.gdx.physics.box2d.Body template)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.Buildercreates a segment that is going to be added toChain.segments- Specified by:
createSegmentin interfaceChain.Builder- Parameters:
index- the index of the segment to createlength- the desired length of theChainthat is being buildchain- theChainthis segment will be added to- Returns:
- a
copyoftemplate
-
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- thetemplateto set
-