Jeffrey T. Palmer > Box2D-0.07 > Box2D::b2FixtureDef

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

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:

Returns a float32

filter()

filter( $filter )

Contact filtering data.

Parameters:

Returns a Box2D::b2Filter

friction()

friction( $friction )

The friction coefficient, usually in the range [0,1].

Parameters:

Returns a float32

restitution()

restitution( $restitution )

The restitution (elasticity) usually in the range [0,1].

Parameters:

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:

Returns a Box2D::b2Shape

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: