#include <b2_world_callbacks.h>
Public Member Functions | |
virtual float | ReportFixture (b2Fixture *fixture, const b2Vec2 &point, const b2Vec2 &normal, float fraction)=0 |
virtual | ~b2RayCastCallback () |
Callback class for ray casts. See b2World::RayCast
Definition at line 140 of file b2_world_callbacks.h.
|
inlinevirtual |
Definition at line 143 of file b2_world_callbacks.h.
|
pure virtual |
Called for each fixture found in the query. You control how the ray cast proceeds by returning a float: return -1: ignore this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip the ray and continue
fixture | the fixture hit by the ray |
point | the point of initial intersection |
normal | the normal vector at the point of intersection |
fraction | the fraction along the ray at the point of intersection |
Implemented in RayCastMultipleCallback, RayCastAnyCallback, RayCastClosestCallback, and EdgeShapesCallback.