b2w_moverCollide function
- @Native<Int32 Function(Int64, Float, Float, Pointer<
Float> , Int32, Float, Uint64, Uint64, Int64, Pointer<Float> , Pointer<Int64> , Int32)>(ffi.Int64, ffi.Float, ffi.Float, ffi.Pointer<ffi.Float>, ffi.Int32, ffi.Float, ffi.Uint64, ffi.Uint64, ffi.Int64, ffi.Pointer<ffi.Float>, ffi.Pointer<ffi.Int64>, ffi.Int32)>()
The surfaces the mover touches, as Box2D collision planes. outPlanes:
maxPlanes * 5 floats, per plane
normalX, normalY, offset, pointX, pointY
The normal points toward the mover; offset is how far the mover reaches
into the surface; the point, on the surface, is relative to origin.
outBodies: maxPlanes handles, the body of each plane. Returns how many
planes it wrote.
Implementation
@ffi.Native<
ffi.Int32 Function(
ffi.Int64,
ffi.Float,
ffi.Float,
ffi.Pointer<ffi.Float>,
ffi.Int32,
ffi.Float,
ffi.Uint64,
ffi.Uint64,
ffi.Int64,
ffi.Pointer<ffi.Float>,
ffi.Pointer<ffi.Int64>,
ffi.Int32,
)
>()
external int b2w_moverCollide(
int worldHandle,
double originX,
double originY,
ffi.Pointer<ffi.Float> points,
int pointCount,
double radius,
int categoryBits,
int maskBits,
int ignoreBody,
ffi.Pointer<ffi.Float> outPlanes,
ffi.Pointer<ffi.Int64> outBodies,
int maxPlanes,
);