Package | Description |
---|---|
com.badlogic.gdx.physics.box2d | |
com.badlogic.gdx.physics.box2d.joints |
Modifier and Type | Field and Description |
---|---|
Body |
JointDef.bodyA
The first attached body.
|
Body |
JointDef.bodyB
The second attached body
|
Body |
JointEdge.other |
Modifier and Type | Field and Description |
---|---|
protected LongMap<Body> |
World.bodies
all known bodies
|
protected Pool<Body> |
World.freeBodies
pool for bodies
|
Modifier and Type | Method and Description |
---|---|
Body |
World.createBody(BodyDef def)
Create a rigid body given a definition.
|
Body |
Fixture.getBody()
Get the parent body of this fixture.
|
Body |
Joint.getBodyA()
Get the first body attached to this joint.
|
Body |
Joint.getBodyB()
Get the second body attached to this joint.
|
Modifier and Type | Method and Description |
---|---|
void |
World.destroyBody(Body body)
Destroy a rigid body given a definition.
|
protected void |
Box2DDebugRenderer.renderBody(Body body) |
protected void |
Fixture.reset(Body body,
long addr) |
Modifier and Type | Method and Description |
---|---|
void |
World.getBodies(Array<Body> bodies) |
Constructor and Description |
---|
Fixture(Body body,
long addr)
Constructs a new fixture
|
JointEdge(Body other,
Joint joint) |
Modifier and Type | Method and Description |
---|---|
void |
MotorJointDef.initialize(Body body1,
Body body2)
Initialize the bodies and offsets using the current transforms.
|
void |
FrictionJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor)
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
|
void |
RevoluteJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor)
Initialize the bodies, anchors, and reference angle using a world anchor point.
|
void |
WeldJointDef.initialize(Body body1,
Body body2,
Vector2 anchor) |
void |
DistanceJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchorA,
Vector2 anchorB)
Initialize the bodies, anchors, and length using the world anchors.
|
void |
PrismaticJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor,
Vector2 axis)
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
|
void |
WheelJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 anchor,
Vector2 axis) |
void |
PulleyJointDef.initialize(Body bodyA,
Body bodyB,
Vector2 groundAnchorA,
Vector2 groundAnchorB,
Vector2 anchorA,
Vector2 anchorB,
float ratio)
Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.
|