public static class Chain.DefBuilder extends java.lang.Object implements Chain.Builder
| Modifier and Type | Field and Description |
|---|---|
protected com.badlogic.gdx.physics.box2d.BodyDef |
bodyDef
the
BodyDef to use in createSegment(int, int, Chain) |
protected com.badlogic.gdx.physics.box2d.FixtureDef |
fixtureDef
the
FixtureDef to use in createSegment(int, int, Chain) |
protected com.badlogic.gdx.physics.box2d.JointDef |
jointDef
the
JointDef to use in createConnection(Body, int, Body, int) |
protected com.badlogic.gdx.physics.box2d.World |
world
the
World in which to create segments and joints |
| Constructor and Description |
|---|
DefBuilder(com.badlogic.gdx.physics.box2d.World world,
com.badlogic.gdx.physics.box2d.BodyDef bodyDef,
com.badlogic.gdx.physics.box2d.FixtureDef fixtureDef,
com.badlogic.gdx.physics.box2d.JointDef jointDef) |
| Modifier and Type | Method and Description |
|---|---|
Chain.Connection |
createConnection(com.badlogic.gdx.physics.box2d.Body seg1,
int seg1index,
com.badlogic.gdx.physics.box2d.Body seg2,
int seg2index)
connects two segments with each other using a
Chain.Connection |
com.badlogic.gdx.physics.box2d.Body |
createSegment(int index,
int length,
Chain chain)
creates a segment that is going to be added to
Chain.segments |
com.badlogic.gdx.physics.box2d.BodyDef |
getBodyDef() |
com.badlogic.gdx.physics.box2d.FixtureDef |
getFixtureDef() |
com.badlogic.gdx.physics.box2d.JointDef |
getJointDef() |
com.badlogic.gdx.physics.box2d.World |
getWorld() |
void |
setBodyDef(com.badlogic.gdx.physics.box2d.BodyDef bodyDef) |
void |
setFixtureDef(com.badlogic.gdx.physics.box2d.FixtureDef fixtureDef) |
void |
setJointDef(com.badlogic.gdx.physics.box2d.JointDef jointDef) |
void |
setWorld(com.badlogic.gdx.physics.box2d.World world) |
protected com.badlogic.gdx.physics.box2d.World world
World in which to create segments and jointsprotected com.badlogic.gdx.physics.box2d.BodyDef bodyDef
BodyDef to use in createSegment(int, int, Chain)protected com.badlogic.gdx.physics.box2d.FixtureDef fixtureDef
FixtureDef to use in createSegment(int, int, Chain)protected com.badlogic.gdx.physics.box2d.JointDef jointDef
JointDef to use in createConnection(Body, int, Body, int)public DefBuilder(com.badlogic.gdx.physics.box2d.World world,
com.badlogic.gdx.physics.box2d.BodyDef bodyDef,
com.badlogic.gdx.physics.box2d.FixtureDef fixtureDef,
com.badlogic.gdx.physics.box2d.JointDef jointDef)
world - the worldbodyDef - the bodyDeffixtureDef - the fixtureDefjointDef - the jointDefpublic com.badlogic.gdx.physics.box2d.Body createSegment(int index,
int length,
Chain chain)
Chain.BuilderChain.segmentscreateSegment in interface Chain.Builderindex - the index of the segment to createlength - the desired length of the Chain that is being buildchain - the Chain this segment will be added tosegment created withbodyDef and fixtureDefpublic Chain.Connection createConnection(com.badlogic.gdx.physics.box2d.Body seg1, int seg1index, com.badlogic.gdx.physics.box2d.Body seg2, int seg2index)
Chain.BuilderChain.ConnectioncreateConnection in interface Chain.Builderseg1 - the first segmentseg1index - the index of the first segmentseg2 - the second segmentseg2index - the index of the second segmentJointDef created with jointDefpublic com.badlogic.gdx.physics.box2d.World getWorld()
worldpublic void setWorld(com.badlogic.gdx.physics.box2d.World world)
world - the world to setpublic com.badlogic.gdx.physics.box2d.BodyDef getBodyDef()
bodyDefpublic void setBodyDef(com.badlogic.gdx.physics.box2d.BodyDef bodyDef)
bodyDef - the bodyDef to setpublic com.badlogic.gdx.physics.box2d.FixtureDef getFixtureDef()
fixtureDefpublic void setFixtureDef(com.badlogic.gdx.physics.box2d.FixtureDef fixtureDef)
fixtureDef - the fixtureDef to setpublic com.badlogic.gdx.physics.box2d.JointDef getJointDef()
jointDefpublic void setJointDef(com.badlogic.gdx.physics.box2d.JointDef jointDef)
jointDef - the jointDef to set