b2w_addChainShape function
Attach a chain of segments. points: count points as x0, y0, x1, y1, …; loop != 0 joins the last back to the first. At least 4 points; an open chain's first and last are ghosts that only shape its ends. A chain is one-sided: it collides on the right of its direction (counter-clockwise points face out) and sensors never see it. Returns its handle, for b2w_destroyChain; 0 for too few points or a dead body.
Implementation
@ffi.Native<
ffi.Int64 Function(
ffi.Int64,
ffi.Pointer<ffi.Float>,
ffi.Int32,
ffi.Int32,
ffi.Float,
ffi.Float,
)
>()
external int b2w_addChainShape(
int bodyHandle,
ffi.Pointer<ffi.Float> points,
int count,
int loop,
double friction,
double restitution,
);