NAME
Box2D::b2FixtureDef - Used to create a fixture.
SYNOPSIS
my $fixture_def = Box2D::b2FixtureDef->new();
$fixture_def->shape( $shape );
$fixture_def->density( $density )
$fixture_def->friction( $friction );
$fixture_def->restitution( $restitution );
my $fixture = $body->CreateFixtureDef( $fixture_def );
DESCRIPTION
A fixture definition is used to create a fixture. This class defines an abstract fixture definition. You can reuse fixture definitions safely.
METHODS
new()
The constructor sets the default fixture definition values.
Returns a Box2D::b2FixtureDef
density()
density( $density )
The density, usually in kg/m^2.
Parameters:
float32
$density
(optional)
Returns a float32
filter()
filter( $filter )
Contact filtering data.
Parameters:
Box2D::b2Filter
$filter
(optional)
Returns a Box2D::b2Filter
friction()
friction( $friction )
The friction coefficient, usually in the range [0,1].
Parameters:
float32
$friction
(optional)
Returns a float32
restitution()
restitution( $restitution )
The restitution (elasticity) usually in the range [0,1].
Parameters:
float32
$restitution
(optional)
Returns a float32
shape()
shape( $shape )
The shape, this must be set. The shape will be cloned, so you can create the shape on the stack.
Parameters:
Box2D::b2Shape
$shape
(optional)
Returns a Box2D::b2Shape
SEE ALSO
BUGS
See "BUGS" in Box2D