b2w_createBody function

  1. @Native<Int64 Function(Int64, Int32, Float, Float, Float)>(ffi.Int64, ffi.Int32, ffi.Float, ffi.Float, ffi.Float)>()
int b2w_createBody(
  1. int worldHandle,
  2. int bodyType,
  3. double posX,
  4. double posY,
  5. double angle,
)

Create a body of bodyType (a B2W_BODY_* value) at (posX, posY), turned by angle. Returns its handle; 0 when the world has gone.

Implementation

@ffi.Native<
  ffi.Int64 Function(ffi.Int64, ffi.Int32, ffi.Float, ffi.Float, ffi.Float)
>()
external int b2w_createBody(
  int worldHandle,
  int bodyType,
  double posX,
  double posY,
  double angle,
);