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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.badlogic.gdx.physics.box2d.Body -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.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.BodyvoidsetTemplate(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
-