Box2D::b2RayCastCallback - Callback class for ray casts
package My::RayCastCallback; use parent qw(Box2D::b2RayCastCallback); sub ReportFixture { my ( $self, $fixture, $point, $normal, $fraction ) = @_; // Do something } 1;
Callback class for ray casts. See "RayCast" in Box2D::b2World.
Creates and returns a new Box2D::b2RayCastCallback. This is an inheritance friendly sub so you're free to leave it as default. Remember to call super in your own code, don't forget to call this!
Box2D::b2RayCastCallback
Called for each fixture found in the query. You control how the ray cast proceeds by returning a float.
Override this method in your subclass.
Parameters:
Box2D::b2Fixture $fixture
Box2D::b2Vec2 $point
Box2D::b2Vec2 $normal
float32 $fraction
Returns:
-1
0
$fraction
1
Report bugs at https://github.com/PerlGameDev/Box2D-perl/issues
See "AUTHORS" in Box2D
See "COPYRIGHT & LICENSE" in Box2D
To install Box2D, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Box2D
CPAN shell
perl -MCPAN -e shell install Box2D
For more information on module installation, please visit the detailed CPAN module installation guide.