Game Development Reference
In-Depth Information
of inertia individually, and then summing together the results. There is
just one complication. The formulas for these primitives assume the origin
of the coordinate space is at some auspicious location, such as at the center
of the sphere. But imagine we are computing the moment of inertia of a
human body and approximating the head by a sphere. Odds are low that
we chose to place the origin in the center of the head. Luckily the parallel
axis theorem tells us how the moment of inertia changes if we translate a
mass.
Assume that J cm is the inertia tensor of some object with mass m,
measured relative to its center of mass. The inertia tensor J
of the mass
measured relative to some arbitrary pivot that has a displacement [x,y,z]
from this center of mass is given by Equation (12.31).
Parallel Axis Theorem
2
3
y 2 + z 2
−xy
−xz
4
5
x 2 + z 2
J
= J cm + m
−xy
−yz
.
(12.31)
x 2 + y 2
−xz
−yz
12.5.4 Collision Response with Rotations
Now let us complete the collision response calculation we started in Sec-
tion 12.4.2. At that time we did not consider rotational effects, but now
we know better. We continue, following Hecker [35].
Remember the basic strategy:
1. Compute the relative velocities at the point of contact.
2. Project the relative velocities onto the surface normal. This is the
velocity that must be counteracted in order to prevent (further) pen-
etration.
3. Compute k, the magnitude of an impulse, such that when we apply
the impulse to both objects (in opposite directions) parallel to the
surface normal, the post-collision velocities, measured along the sur-
face normal, have the desired magnitude according to some collision
law. This discussion will be based upon Newton's collision law and
the coe cient of restitution e.
4. Apply the impulse k n to one object and −k n to the other.
 
Search WWH ::




Custom Search