Table of Contents

Class b2RayCastCallback

Namespace
Gym.Box2D
Assembly
Gym.Environments.dll

Told about each fixture a RayCast(b2RayCastCallback, b2Vec2, b2Vec2) ray hits (pybox2d's rayCastCallback, which BipedalWalker's lidar subclasses). Hits arrive in tree order, not by distance.

public abstract class b2RayCastCallback
Inheritance
b2RayCastCallback
Inherited Members
Extension Methods

Methods

ReportFixture(b2Fixture, b2Vec2, b2Vec2, float)

Called for each fixture hit.

public abstract float ReportFixture(b2Fixture fixture, b2Vec2 point, b2Vec2 normal, float fraction)

Parameters

fixture b2Fixture

The fixture hit.

point b2Vec2

The point of initial intersection.

normal b2Vec2

The normal at that point.

fraction float

The fraction along the ray.

Returns

float

-1 to ignore this fixture, 0 to stop, the fraction to clip the ray to it, or 1 to continue.