Public Member Functions | List of all members
b2RayCastCallback Class Referenceabstract

#include <b2_world_callbacks.h>

Inheritance diagram for b2RayCastCallback:
Inheritance graph
[legend]

Public Member Functions

virtual float ReportFixture (b2Fixture *fixture, const b2Vec2 &point, const b2Vec2 &normal, float fraction)=0
 
virtual ~b2RayCastCallback ()
 

Detailed Description

Callback class for ray casts. See b2World::RayCast

Definition at line 140 of file b2_world_callbacks.h.

Constructor & Destructor Documentation

◆ ~b2RayCastCallback()

virtual b2RayCastCallback::~b2RayCastCallback ( )
inlinevirtual

Definition at line 143 of file b2_world_callbacks.h.

Member Function Documentation

◆ ReportFixture()

virtual float b2RayCastCallback::ReportFixture ( b2Fixture fixture,
const b2Vec2 point,
const b2Vec2 normal,
float  fraction 
)
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

Parameters
fixturethe fixture hit by the ray
pointthe point of initial intersection
normalthe normal vector at the point of intersection
fractionthe fraction along the ray at the point of intersection
Returns
-1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue

Implemented in RayCastMultipleCallback, RayCastAnyCallback, RayCastClosestCallback, and EdgeShapesCallback.


The documentation for this class was generated from the following file:


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22