Box2D
view release on metacpan or search on metacpan
lib/pods/Box2D/b2Body.pod view on Meta::CPAN
=head2 CreateFixture( $shape, $density )
Creates a fixture from a shape and attach it to this body. This is a convenience function. Use b2FixtureDef if you need to set parameters like friction, restitution, user data, or filtering. If the density is non-zero, this function automatically upd...
Parameters:
=over 4
=item * C<Box2D::b2Shape> C<$shape> - the shape to be cloned.
=item * C<float32> C<$density> - the shape density (set to zero for static bodies). Warning:This function is locked during callbacks.
=back
Returns a C<Box2D::b2Fixture>
=head2 CreateFixtureDef( $def )
Creates a fixture and attach it to this body. Use this function if you need to set some fixture parameters, like friction. Otherwise you can create the fixture directly from a shape. If the density is non-zero, this function automatically updates the...
Parameters:
=over 4
=item * C<Box2D::b2FixtureDef> C<$def> - the fixture definition. Warning:This function is locked during callbacks.
=back
Returns a C<Box2D::b2Fixture>
=head2 DestroyFixture( $fixture )
Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts associated with this fixture. This will automatically adjust the mass of the body if the body is dynamic and the fixture has positive density. All fixtures att...
Parameters:
=over 4
=item * C<Box2D::b2Fixture> C<$fixture> - the fixture to be removed. Warning:This function is locked during callbacks.
=back
=head2 GetAngle()
Get the angle in radians.
Returns a C<float32> - the current world rotation angle in radians.
=head2 GetAngularDamping()
lib/pods/Box2D/b2World.pod view on Meta::CPAN
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
=item * C<Box2D::b2JointDef> C<$def>
=back
Returns a C<Box2D::b2Joint>
=head2 DestroyBody( $body )
Destroy a rigid body given a definition. No reference to the definition
is retained. This function is locked during callbacks.
Warning: This automatically deletes all associated shapes and joints.
This function is locked during callbacks.
Parameters:
=over 4
=item * C<Box2D::b2Body> C<$body>
=back
=head2 GetGravity()
( run in 0.448 second using v1.01-cache-2.11-cpan-49f99fa48dc )