NAME
Box2D::b2MassData - Holds the mass data computed for a shape.
SYNOPSIS
my $massData = Box2D::b2MassData->new();
$shape->ComputeMass( $massData, $density );
my $mass = $massData->mass();
my $center = $massData->center();
my $inertia = $massData->I();
DESCRIPTION
This holds the mass data computed for a shape.
METHODS
new()
Default constructor.
center()
center( $center )
The position of the shape's centroid relative to the shape's origin.
Parameters:
Box2D::b2Vec2
$center
(optional)
Returns a Box2D::b2Vec2
I()
I( $I )
The rotational inertia of the shape about the local origin.
Parameters:
float32
$I
(optional)
Returns a float32
mass()
mass( $mass )
The mass of the shape, usually in kilograms.
Parameters:
float32
$mass
(optional)
Returns a float32
SEE ALSO
BUGS
See "BUGS" in Box2D