Box2D::b2MassData - Holds the mass data computed for a shape.
my $massData = Box2D::b2MassData->new(); $shape->ComputeMass( $massData, $density ); my $mass = $massData->mass(); my $center = $massData->center(); my $inertia = $massData->I();
This holds the mass data computed for a shape.
Default constructor.
The position of the shape's centroid relative to the shape's origin.
Parameters:
Box2D::b2Vec2 $center (optional)
Box2D::b2Vec2
$center
Returns a Box2D::b2Vec2
The rotational inertia of the shape about the local origin.
float32 $I (optional)
float32
$I
Returns a float32
The mass of the shape, usually in kilograms.
float32 $mass (optional)
$mass
Box2D
Box2D::b2Shape
See "BUGS" in Box2D
See "AUTHORS" in Box2D
See "COPYRIGHT & LICENSE" in Box2D
To install Box2D, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Box2D
CPAN shell
perl -MCPAN -e shell install Box2D
For more information on module installation, please visit the detailed CPAN module installation guide.