A Quick Introduction
A point (no size or shape).
Got Position & Velocity.
All bodies in Box2D are rigid.
Can "carry" fixtures.
types of bodies:
Has infinite mass
No Velocity, (position is set by user)
Does not collide with other static bodies.
Used as walls, platforms etc...
Fully simulated - i,e can
be moved by force.
Can collide with all 3 types
Has a mass (finite)
Hybrid of static & dynamic
Can have velocity
No response to forces
Collide only with dynamic bodies only
Used for things like moving platforms etc...
density, friction, etc...
used to compute the mass of the parent body
used to compute friction on contact...
used to make stuff bounce!
Simple classes to describe collision geometry
Box2D supports ellipses and convex polygons
Also "Edge Shape" & "Chain Shape"
Force & Impulse
b2Body.ApplyImpulse() - Bam! all at once
b2Body.ApplyForce() - slow
b2Body.SetLinearVelocity() - ignore simulation
b2Body.SetLinearDamping() - affects all forces
b2Body.SetGravityScale() - affects gravity
Are managed with contacts
Distance Joint - keeps constant distance
Revolute Joint - Rotate around a point
Prismatic Joint - keeps rotation aligned
Pulley Joint - 1 up and 1 down
And a few more...
Using Box2D with QT