b2w_addRoundedPolygonShape function

  1. @Native<Void Function(Int64, Pointer<Float>, Int32, Float, Float, Float, Float)>(ffi.Int64, ffi.Pointer<ffi.Float>, ffi.Int32, ffi.Float, ffi.Float, ffi.Float, ffi.Float)>()
void b2w_addRoundedPolygonShape(
  1. int bodyHandle,
  2. Pointer<Float> verts,
  3. int count,
  4. double cornerRadius,
  5. double density,
  6. double friction,
  7. double restitution,
)

Attach a convex polygon grown by cornerRadius, which rounds its corners. verts as for b2w_addPolygonShape, cut the same way past 8 points (the pieces then overlap along their seams by the rounding).

Implementation

@ffi.Native<
  ffi.Void Function(
    ffi.Int64,
    ffi.Pointer<ffi.Float>,
    ffi.Int32,
    ffi.Float,
    ffi.Float,
    ffi.Float,
    ffi.Float,
  )
>()
external void b2w_addRoundedPolygonShape(
  int bodyHandle,
  ffi.Pointer<ffi.Float> verts,
  int count,
  double cornerRadius,
  double density,
  double friction,
  double restitution,
);