Box2D
view release on metacpan or search on metacpan
lib/pods/Box2D/b2World.pod view on Meta::CPAN
=head1 NAME
Box2D::b2World - Manages all aspects of the simulation.
=head1 SYNOPSIS
my $world = Box2D::b2World->new( $gravity, $doSleep );
=head1 DESCRIPTION
The C<Box2D::b2World> class contains the bodies and joints. It manages
all aspects of the simulation and allows for asynchronous queries (like
AABB queries and ray-casts). Much of your interactions with Box2D will
be with a C<Box2D::b2World> object.
=head1 METHODS
=head2 new( $gravity, $doSleep )
Construct a world object.
Parameters:
=over 4
=item * C<Box2D::b2Vec2> C<$gravity> - the world gravity vector.
=item * C<bool> C<$doSleep> - improve performance by not simulating inactive
bodies.
=back
Returns a C<Box2D::b2World>
=head2 ClearForces()
Call this after you are done with time steps to clear the forces.
You normally call this after each call to Step, unless you are
performing sub-steps. By default, forces will be automatically cleared,
so you don't need to call this function.
See also: SetAutoClearForces
=head2 CreateBody( $def )
Create a rigid body given a definition. No reference to the definition
is retained.
Warning: This function is locked during callbacks.
Parameters:
=over 4
=item * C<Box2D::b2BodyDef> C<$def>
=back
Returns a C<Box2D::b2Body>
=head2 CreateJoint( $def )
Create a joint to constrain bodies together. No reference to the
definition is retained. This may cause the connected bodies to cease
colliding.
Warning: This function is locked during callbacks.
Parameters:
=over 4
( run in 0.737 second using v1.01-cache-2.11-cpan-39bf76dae61 )