b2w_castRayAll function
Cast a ray and report up to maxHits hits, in no order, one per shape (a
body of several shapes can be there more than once). outBodies: maxHits
handles. outBuffer: maxHits * 5 floats, per hit
pointX, pointY, normalX, normalY, fraction
A shape the ray starts inside is a hit at fraction 0, at the origin, with
a zero normal. Returns how many it wrote.
Implementation
@ffi.Native<
ffi.Int32 Function(
ffi.Int64,
ffi.Float,
ffi.Float,
ffi.Float,
ffi.Float,
ffi.Uint64,
ffi.Uint64,
ffi.Pointer<ffi.Int64>,
ffi.Pointer<ffi.Float>,
ffi.Int32,
)
>()
external int b2w_castRayAll(
int worldHandle,
double originX,
double originY,
double translationX,
double translationY,
int categoryBits,
int maskBits,
ffi.Pointer<ffi.Int64> outBodies,
ffi.Pointer<ffi.Float> outBuffer,
int maxHits,
);