Inertia seems to be useful in a physics engine, so useful that even in Box2DLite, a demo of Box2D it hasn't been omitted.
See this Body class from Box2DLite:
struct Body
{
Body();
void Set(const Vec2& w, float m);
void AddForce(const Vec2& f)
{
force += f;
}
Vec2 position;
float rotation;
Vec2 velocity;
float angularVelocity;
Vec2 force;
float torque;
Vec2 width;
float friction;
float mass, invMass;
float I, invI; //inertia and reverse inertia
};
In the implementation of the class, inertia is set as the mass multipled by something:
I = mass * (width.x * width.x + width.y * width.y) / 12.0f;
invI = 1.0f / I;
What does this formula means ? I understood from wikipedia that Inertia is how much something doesn't want to move but there's not much formulas in this article. Why is it useful in a physics engine ? How is it used in the context of a collision ? Is it compared to other bodies ?