inertia = physics.misc.momentForPoly(mass, vertices, offset)
Parameter |
Type |
Description |
---|---|---|
mass |
in number |
The mass of the polygon |
vertices |
in {physics.Vect} |
A list of vertices defining the shape of the polygon |
offset |
in physics.Vect |
The offset of the polygon from the center of gravity |
inertia |
out number |
The inertia of the polygon |
This
routine computes the moment of inertia for a polygon.
This is a useful helper routine for computing the moment of inertia as an input
to the physics.Body(...)
constructor.
Introduced in platform.apiLevel = '2.0'