jj_body_create function

  1. @Native<Int64 Function(Int64, Pointer<JPH_Shape>, Pointer<JJ_BodySettings>)>(ffi.Int64, ffi.Pointer<JPH_Shape>, ffi.Pointer<JJ_BodySettings>)>()
int jj_body_create(
  1. int world,
  2. Pointer<JPH_Shape> shape,
  3. Pointer<JJ_BodySettings> settings
)

Makes a body of shape (a joltc shape; the body takes its own reference) and adds it to the world. Returns 0 when it cannot be made: a dead world, a full world, a layer out of range, or a shape that must be static (a mesh or height field) on a dynamic body.

Implementation

@ffi.Native<
  ffi.Int64 Function(
    ffi.Int64,
    ffi.Pointer<JPH_Shape>,
    ffi.Pointer<JJ_BodySettings>,
  )
>()
external int jj_body_create(
  int world,
  ffi.Pointer<JPH_Shape> shape,
  ffi.Pointer<JJ_BodySettings> settings,
);