Jeffrey T. Palmer > Box2D > Box2D::b2RayCastCallback

Download:
Box2D-0.07.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Box2D::b2RayCastCallback - Callback class for ray casts.

SYNOPSIS ^

    package My::RayCastCallback;
    use Box2D;

    use base qw(Box2D::b2RayCastCallback);

    sub ReportFixture {
        my ( $self, $fixture, $point, $normal, $fraction ) = @_;

        # Do something
    }

    1;

DESCRIPTION ^

Callback class for ray casts. See Box2D::b2World::RayCast.

METHODS ^

new()

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!

Returns a Box2D::b2RayCastCallback

ReportFixture( $fixture, $point, $normal, $fraction )

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:

Returns a float32:

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

SEE ALSO ^

syntax highlighting: