Jeffrey T. Palmer > Box2D > Box2D::b2MassData

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

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:

Returns a Box2D::b2Vec2

I()

I( $I )

The rotational inertia of the shape about the local origin.

Parameters:

Returns a float32

mass()

mass( $mass )

The mass of the shape, usually in kilograms.

Parameters:

Returns a float32

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: