Some IMPORTANT things to know before you start working with Box2dweb


The following excerpt is from Box2d Manual.

Box2D works with several fundamental objects. We briefly define these objects here and more details are given later in this document.

SHAPE: A 2D geometrical object, such as a circle or polygon.

RIGID BODY: A chunk of matter that is so strong that the distance between any two bits of matter on the chunk is constant. They are hard like a diamond. In the following discussion we use body interchangeably with rigid body.

FIXTURE: A fixture binds a shape to a body and adds material properties such as density, friction, and restitution.

CONSTRAINT: A constraint is a physical connection that removes degrees of freedom from bodies. In 2D a body has 3 degrees of freedom (two translation coordinates and one rotation coordinate). If we take a body and pin it to the wall (like a pendulum) we have constrained the body to the wall. At this point the body can only rotate about the pin, so the constraint has removed 2 degrees of freedom.

JOINT: This is a constraint used to hold two or more bodies together. Box2D supports several joint types: revolute, prismatic, distance, and more. Some joints may have limits and motors.

WORLD: A physics world is a collection of bodies, fixtures, and constraints that interact together. Box2D supports the creation of multiple worlds, but this is usually not necessary or desirable.

By administrator at 11:53:57 AM 2 Comment(s)


Is it bad using multiple worlds? or is it just not really used?

By Djonn on 24 Jan, 2013 at 01:33:06 PM

I've not yet seen any example demonstrating multiple worlds. If you do please share the link.

By administrator on 26 Jan, 2013 at 05:14:12 AM

Add a Comment

Please enter the email address.Invalid format. (Won't be Displayed)
Notify me of followup comments
Enter the displayed Code: captcha