Java com.badlogic.gdx.physics.box2d World fields, constructors, methods, implement or subclass

Example usage for Java com.badlogic.gdx.physics.box2d World fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.badlogic.gdx.physics.box2d World.

The text is from its open source code.

Constructor

World(Vector2 gravity, boolean doSleep)
Construct a world object.

Method

BodycreateBody(BodyDef def)
Create a rigid body given a definition.
JointcreateJoint(JointDef def)
Create a joint to constrain bodies together.
voiddestroyBody(Body body)
Destroy a rigid body given a definition.
voiddestroyJoint(Joint joint)
Destroy a joint.
voiddispose()
booleangetAutoClearForces()
Get the flag that controls automatic clearing of forces after each time step.
voidgetBodies(Array bodies)
intgetBodyCount()
Get the number of bodies.
ArraygetContactList()
Vector2getGravity()
voidgetJoints(Array joints)
voidrayCast(final RayCastCallback callback, Vector2 point1, Vector2 point2)
voidsetAutoClearForces(boolean flag)
Set flag to control automatic clearing of forces after each time step.
voidsetContactFilter(final ContactFilter filter)
Register a contact filter to provide specific control over collision.
voidsetContactListener(final ContactListener listener)
voidsetGravity(Vector2 gravity)
Change the global gravity vector.
voidstep(float timeStep, int velocityIterations, int positionIterations)
Take a time step.