| Package | Description |
|---|---|
| net.dermetfan.gdx.physics.box2d |
| Class and Description |
|---|
| Box2DMapObjectParser
Parses
MapObjects from a Map and generates Box2D Bodies, Fixtures and Joints from them.Just create a new Box2DMapObjectParser and call Box2DMapObjectParser.load(World, MapLayer) to load all compatible objects (defined by the the Box2DMapObjectParser.aliases) into your World.If you only want specific Fixtures or Bodies, you can use the Box2DMapObjectParser.createBody(World, MapObject) and Box2DMapObjectParser.createFixture(MapObject) methods.How you define compatible objects in the TiledMap editor: In your object layer, right-click an object and set its properties to those of the Body/Fixture/both (in case you're creating an object) you'd like, as defined in the used Box2DMapObjectParser.Aliases object.For type, you have to choose Box2DMapObjectParser.Aliases.body, Box2DMapObjectParser.Aliases.fixture or Box2DMapObjectParser.Aliases.object.To add Fixtures to a Body, add a Box2DMapObjectParser.Aliases.body property with the same value to each Fixture of a Body.To create Joints, add any object to the layer and just put everything needed in its properties. |
| Box2DMapObjectParser.Aliases
defines the
Box2DMapObjectParser.aliases to use when parsing |
| Box2DMapObjectParser.Listener
Allows modification of
MapObjects before they are used to create Box2D objects.Note that the map object given to you is the one directly from the map, so if you modify it, you modify the Map instance! If you want to avoid that, make a copy.Also listens to Box2D objects that have been created. |
| Box2DMapObjectParser.Listener.Adapter
Does nothing.
|
| Box2DUtils.PreconditionCheck
checks if Box2D's preconditions are met to avoid native crashes
|
| Box2DUtils.PreconditionCheck.InvalidChainShapeException.Problem
the reason why this ChainShape cannot be created
|
| Box2DUtils.PreconditionCheck.InvalidPolygonShapeException.Problem
the reason this shape is invalid
|
| Box2DUtils.PreconditionCheck.InvalidPolyShapeException
indicates that a poly shape cannot be created from these vertices
|
| Box2DUtils.ShapeCache
cached method results
|
| Breakable
Breaks bodies or fixtures if they get hit too hard.
|
| Breakable.Callback
a callback for a
Breakable if its container (body or fixture) was destroyed (for example to play a sound) |
| Chain
Holds
Chain.segments and Chain.connections to simulate a chain. |
| Chain.Builder
used by a
Chain to modify it |
| Chain.Connection
holds one or more
joints |
| Chain.CopyBuilder |
| MouseJointAdapter
an
InputAdapter managing a MouseJoint |
| MouseJointAdapter.Listener |
| PositionController
moves a body to a position using forces
|
| RotationController
rotates a body to an angle using torque
|
| WorldObserver
Notifies a
WorldObserver.Listener of changes in the world. |
| WorldObserver.BodyChange
the changes of a
Body |
| WorldObserver.Change
the changes of an object in a world since the last time
WorldObserver.Change.update(Object) was called |
| WorldObserver.FixtureChange
the changes of a
Fixture |
| WorldObserver.JointChange
the changes of a
Joint |
| WorldObserver.Listener
the listener notified by a
WorldObserver |
| WorldObserver.UnexpectedListener.ExpectationBase
Only for internal use.
|
| WorldObserver.WorldChange
the changes of a
World |