You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > momentForSegment

19.1.5 momentForSegment

inertia = physics.misc.momentForSegment(mass, endPointA,
                                       endPointB)

Parameter

Type

Description

mass

in number

The mass of the segment

endPointA

in physics.Vect

The point defining one end of the segment

endPointB

in physics.Vect

The point defining the other end of the segment

inertia

out number

The inertia of the segment


This routine computes the moment of inertia for a segment. The end points can be in either
world or local coordinates. 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'