JBox2D is a Java physics engine often used in games an other physics simulations and is a port/extension of the C++ physics engine, Box2D.
JBox2D is a physics engine for Java often used in games and other physics simulations, and is a port/extension of the C++ physics engine, Box2D.
Questions
Questions with the jbox2d
tag should be specifically about JBox2D and its implementation. Questions about the physics engine in general should be tagged with box2d
as well.
Brief Definitions
- World contains the physics environment for a simulation
- Body is a physics entity with any number of child fixtures. These fixtures are treated as all part of the same physics object, and will interact accordingly (they won't break up). Bodies also provide support for user-applied forces and torque.
- Fixture contains a single shape and information about it (for example, friction and restitution).
- Shape contains information about the basic physical properties of the physics object. (for example, the vertices of the polygon shape)
- Joint is basically a way of adding constraints to different bodies. There are a variety of joints, including revolute, distance, and prismatic joints.