Box2D
view release on metacpan or search on metacpan
lib/pods/Box2D/b2BodyDef.pod view on Meta::CPAN
=head1 NAME
Box2D::b2BodyDef - Holds all the data needed to construct a rigid body.
=head1 SYNOPSIS
my $body_def = Box2D::b2BodyDef->new();
$body_def->type( Box2D::b2_dynamicBody );
$body_def->position->Set( $x, $y );
$body_def->angle( $theta );
my $body = $world->CreateBody( $body_def );
=head1 DESCRIPTION
A body definition holds all the data needed to construct a rigid body.
You can safely re-use body definitions. Shapes are added to a body after
construction.
=head1 METHODS
=head2 new()
This constructor sets the body definition default values.
Returns a C<Box2D::b2BodyDef>
=head2 active()
=head2 active( $active )
Does this body start out active?
Parameters:
=over 4
=item * C<bool> C<$active> (optional)
=back
Returns a C<bool>
=head2 allowSleep()
=head2 allowSleep( $allowSleep )
Set this flag to false if this body should never fall asleep. Note that
this increases CPU usage.
Parameters:
=over 4
=item * C<bool> C<$allowSleep> (optional)
=back
Returns a C<bool>
=head2 angle()
=head2 angle( $angle )
The world angle of the body in radians.
Parameters:
=over 4
=item * C<float32> C<$angle> (optional)
=back
Returns a C<float32>
( run in 1.307 second using v1.01-cache-2.11-cpan-5735350b133 )